├── .azuredevops └── rocm-ci.yml ├── .clang-format ├── .git-blame-ignore-revs ├── .gitattributes ├── .githooks ├── install └── pre-commit ├── .github ├── CODEOWNERS ├── dependabot.yml └── workflows │ └── docs.yaml ├── .gitignore ├── .gitlab-ci.yml ├── .gitlab └── run_benchmarks.py ├── .jenkins ├── common.groovy ├── precheckin.groovy ├── staticanalysis.groovy └── staticlibrary.groovy ├── .readthedocs.yaml ├── CHANGELOG.md ├── CMakeLists.txt ├── CONTRIBUTING.md ├── LICENSE ├── NOTICES.txt ├── README.md ├── benchmarks ├── CMakeLists.txt ├── bench │ ├── adjacent_difference │ │ ├── basic.cu │ │ ├── custom.cu │ │ └── in_place.cu │ ├── copy │ │ ├── basic.cu │ │ ├── if.cu │ │ └── if_fallback.cu │ ├── equal │ │ └── basic.cu │ ├── fill │ │ └── basic.cu │ ├── for_each │ │ └── basic.cu │ ├── inner_product │ │ └── basic.cu │ ├── merge │ │ └── basic.cu │ ├── partition │ │ └── basic.cu │ ├── reduce │ │ ├── basic.cu │ │ └── by_key.cu │ ├── scan │ │ ├── exclusive │ │ │ ├── by_key.cu │ │ │ ├── max.cu │ │ │ └── sum.cu │ │ └── inclusive │ │ │ ├── by_key.cu │ │ │ ├── max.cu │ │ │ └── sum.cu │ ├── set_operations │ │ ├── base.hpp │ │ ├── by_key.hpp │ │ ├── difference.cu │ │ ├── difference_by_key.cu │ │ ├── intersection.cu │ │ ├── intersection_by_key.cu │ │ ├── symmetric_difference.cu │ │ ├── symmetric_difference_by_key.cu │ │ ├── union.cu │ │ └── union_by_key.cu │ ├── shuffle │ │ └── basic.cu │ ├── sort │ │ ├── keys.cu │ │ ├── keys_custom.cu │ │ ├── pairs.cu │ │ └── pairs_custom.cu │ ├── tabulate │ │ └── basic.cu │ ├── transform │ │ └── basic.cu │ ├── transform_reduce │ │ └── sum.cu │ ├── unique │ │ ├── basic.cu │ │ └── by_key.cu │ └── vectorized_search │ │ ├── basic.cu │ │ ├── lower_bound.cu │ │ └── upper_bound.cu └── bench_utils │ ├── bench_utils.hpp │ ├── cmdparser.hpp │ ├── common │ └── types.hpp │ ├── custom_reporter.hpp │ └── generation_utils.hpp ├── cmake ├── Benchmarks.cmake ├── Dependencies.cmake ├── DownloadProject.CMakeLists.cmake.in ├── DownloadProject.cmake ├── FindROCMCmake.cmake ├── GenerateResourceSpec.cmake ├── ROCMExportTargetsHeaderOnly.cmake ├── Summary.cmake └── VerifyCompiler.cmake ├── custom.properties ├── doc └── CHANGELOG.md ├── docs ├── .gitignore ├── bitwise-repro.rst ├── classification-map.xml ├── conf.py ├── cpp_api.rst ├── data-type-support.rst ├── doxygen │ └── Doxyfile ├── environment.yml ├── hip-execution-policies.rst ├── hipgraph-support.rst ├── how-to │ ├── run-rocThrust-tests-on-multiple-gpus.rst │ └── use-rocThrust-in-a-project.rst ├── index.rst ├── install │ ├── rocThrust-install-overview.rst │ ├── rocThrust-install-script.rst │ ├── rocThrust-install-with-cmake.rst │ ├── rocThrust-prerequisites.rst │ └── rocThrust-rmake-install.rst ├── license.rst ├── reference │ └── rocThrust-hipstdpar.rst └── sphinx │ ├── _toc.yml.in │ ├── requirements.in │ └── requirements.txt ├── examples ├── CMakeLists.txt ├── README.md ├── arbitrary_transformation.cu ├── basic_vector.cu ├── bounding_box.cu ├── bucket_sort2d.cu ├── constant_iterator.cu ├── counting_iterator.cu ├── cpp_integration │ ├── CMakeLists.txt │ ├── README │ ├── device.cu │ ├── device.h │ └── host.cpp ├── cuda │ ├── CMakeLists.txt │ ├── async_reduce.cu │ ├── custom_temporary_allocation.cu │ ├── explicit_cuda_stream.cu │ ├── global_device_vector.cu │ └── range_view.cu ├── device_ptr.cu ├── discrete_voronoi.cu ├── dot_products_with_zip.cu ├── expand.cu ├── fill_copy_sequence.cu ├── histogram.cu ├── include │ ├── host_device.h │ └── timer.h ├── lambda.cu ├── lexicographical_sort.cu ├── max_abs_diff.cu ├── minimal_custom_backend.cu ├── minmax.cu ├── mode.cu ├── monte_carlo.cu ├── monte_carlo_disjoint_sequences.cu ├── mr_basic.cu ├── norm.cu ├── padded_grid_reduction.cu ├── permutation_iterator.cu ├── raw_reference_cast.cu ├── remove_points2d.cu ├── repeated_range.cu ├── run_length_decoding.cu ├── run_length_encoding.cu ├── saxpy.cu ├── scan_by_key.cu ├── scan_matrix_by_rows.cu ├── set_operations.cu ├── simple_moving_average.cu ├── sort.cu ├── sorting_aos_vs_soa.cu ├── sparse_vector.cu ├── stream_compaction.cu ├── strided_range.cu ├── sum.cu ├── sum_rows.cu ├── summary_statistics.cu ├── summed_area_table.cu ├── tiled_range.cu ├── transform_input_output_iterator.cu ├── transform_iterator.cu ├── transform_output_iterator.cu ├── uninitialized_vector.cu ├── version.cu ├── weld_vertices.cu └── word_count.cu ├── extra ├── CMakeLists.txt └── test_rocthrust_package.cpp ├── install ├── internal └── test │ └── thrust.example.cuda.explicit_cuda_stream.filecheck ├── rmake.py ├── rtest.py ├── rtest.xml ├── scripts ├── code-format │ └── check-format.sh ├── copyright-date │ └── check-copyright.sh └── gdb-pretty-printers.py ├── test ├── CMakeLists.txt ├── bitwise_repro │ ├── bwr_db.hpp │ └── bwr_utils.hpp ├── hipstdpar │ ├── CMakeLists.txt │ ├── test_algorithms.cpp │ └── test_interpose.cpp ├── test_adjacent_difference.cpp ├── test_advance.cpp ├── test_allocator.cpp ├── test_allocator_aware_policies.cpp ├── test_assertions.hpp ├── test_async_copy.cpp ├── test_async_for_each.cpp ├── test_async_reduce.cpp ├── test_async_scan.cpp ├── test_async_sort.cpp ├── test_async_transform.cpp ├── test_binary_search.cpp ├── test_binary_search_descending.cpp ├── test_binary_search_vector.cpp ├── test_binary_search_vector_descending.cpp ├── test_complex.cpp ├── test_complex_transform.cpp ├── test_constant_iterator.cpp ├── test_copy.cpp ├── test_copy_n.cpp ├── test_count.cpp ├── test_counting_iterator.cpp ├── test_dereference.cpp ├── test_device_delete.cpp ├── test_device_ptr.cpp ├── test_device_reference.cpp ├── test_discard_iterator.cpp ├── test_distance.cpp ├── test_equal.cpp ├── test_fill.cpp ├── test_find.cpp ├── test_for_each.cpp ├── test_gather.cpp ├── test_generate.cpp ├── test_header.hpp ├── test_inner_product.cpp ├── test_is_partitioned.cpp ├── test_is_sorted.cpp ├── test_is_sorted_until.cpp ├── test_max_element.cpp ├── test_memory.cpp ├── test_merge.cpp ├── test_merge_by_key.cpp ├── test_min_element.cpp ├── test_minmax_element.cpp ├── test_mismatch.cpp ├── test_mr_disjoint_pool.cpp ├── test_mr_new.cpp ├── test_mr_pool.cpp ├── test_mr_pool_options.cpp ├── test_optional.cpp ├── test_pair.cpp ├── test_pair_reduce.cpp ├── test_pair_scan.cpp ├── test_pair_sort.cpp ├── test_pair_transform.cpp ├── test_parallel_for.cpp ├── test_partition.cpp ├── test_partition_point.cpp ├── test_permutation_iterator.cpp ├── test_random.cpp ├── test_reduce.cpp ├── test_reduce_by_key.cpp ├── test_remove.cpp ├── test_replace.cpp ├── test_reproducibility.cpp ├── test_reverse_iterator.cpp ├── test_scan.cpp ├── test_scan_by_key.cpp ├── test_scatter.cpp ├── test_seed.in.hpp ├── test_sequence.cpp ├── test_set_difference.cpp ├── test_set_difference_by_key.cpp ├── test_set_difference_by_key_descending.cpp ├── test_set_difference_descending.cpp ├── test_set_intersection.cpp ├── test_set_intersection_by_key.cpp ├── test_set_intersection_by_key_descending.cpp ├── test_set_intersection_descending.cpp ├── test_set_intersection_key_value.cpp ├── test_set_symmetric_difference.cpp ├── test_set_symmetric_difference_by_key.cpp ├── test_set_symmetric_difference_by_key_descending.cpp ├── test_set_symmetric_difference_descending.cpp ├── test_set_union.cpp ├── test_set_union_by_key.cpp ├── test_set_union_by_key_descending.cpp ├── test_set_union_descending.cpp ├── test_set_union_key_value.cpp ├── test_shuffle.cpp ├── test_sort.cpp ├── test_sort_by_key.cpp ├── test_sort_by_key_variable_bits.cpp ├── test_sort_permutation_iterator.cpp ├── test_sort_variables.cpp ├── test_stable_sort.cpp ├── test_stable_sort_by_key.cpp ├── test_stable_sort_by_key_large_keys.cpp ├── test_stable_sort_by_key_large_keys_and_values.cpp ├── test_stable_sort_by_key_large_values.cpp ├── test_stable_sort_large.cpp ├── test_swap_ranges.cpp ├── test_tabulate.cpp ├── test_transform.cpp ├── test_transform_iterator.cpp ├── test_transform_reduce.cpp ├── test_transform_scan.cpp ├── test_tuple.cpp ├── test_tuple_reduce.cpp ├── test_tuple_sort.cpp ├── test_tuple_transform.cpp ├── test_uninitialized_copy.cpp ├── test_uninitialized_fill.cpp ├── test_unique.cpp ├── test_unique_by_key.cpp ├── test_universal_memory.cpp ├── test_utils.hpp ├── test_vector.cpp ├── test_vector_allocators.cpp ├── test_vector_insert.cpp ├── test_vector_manipulation.cpp ├── test_zip_iterator.cpp ├── test_zip_iterator_reduce.cpp ├── test_zip_iterator_reduce_by_key.cpp ├── test_zip_iterator_scan.cpp ├── test_zip_iterator_sort.cpp └── test_zip_iterator_sort_by_key.cpp ├── testing ├── CMakeLists.txt ├── adjacent_difference.cu ├── advance.cu ├── alignment.cu ├── allocator.cu ├── allocator_aware_policies.cu ├── async │ ├── CMakeLists.txt │ ├── exclusive_scan │ │ ├── CMakeLists.txt │ │ ├── counting_iterator.cu │ │ ├── discard_output.cu │ │ ├── large_indices.cu │ │ ├── large_types.cu │ │ ├── mixed_types.cu │ │ ├── mixin.h │ │ ├── simple.cu │ │ ├── stateful_operator.cu │ │ └── using_vs_adl.cu │ ├── inclusive_scan │ │ ├── CMakeLists.txt │ │ ├── counting_iterator.cu │ │ ├── discard_output.cu │ │ ├── large_indices.cu │ │ ├── large_types.cu │ │ ├── mixed_types.cu │ │ ├── mixin.h │ │ ├── simple.cu │ │ ├── stateful_operator.cu │ │ └── using_vs_adl.cu │ ├── mixin.h │ └── test_policy_overloads.h ├── async_copy.cu ├── async_for_each.cu ├── async_reduce.cu ├── async_reduce_into.cu ├── async_sort.cu ├── async_transform.cu ├── binary_search.cu ├── binary_search_descending.cu ├── binary_search_vector.cu ├── binary_search_vector_descending.cu ├── caching_allocator.cu ├── cmake │ └── check_namespace.cmake ├── complex.cu ├── complex_transform.cu ├── constant_iterator.cu ├── copy.cu ├── copy_n.cu ├── count.cu ├── counting_iterator.cu ├── cpp │ ├── CMakeLists.txt │ └── adjacent_difference.cu ├── cuda │ ├── CMakeLists.txt │ ├── adjacent_difference.cu │ ├── binary_search.cu │ ├── complex.cu │ ├── copy.cu │ ├── copy_if.cu │ ├── count.cu │ ├── cudart.cu │ ├── device_side_universal_vector.cu │ ├── equal.cu │ ├── fill.cu │ ├── find.cu │ ├── for_each.cu │ ├── gather.cu │ ├── generate.cu │ ├── inner_product.cu │ ├── is_partitioned.cu │ ├── is_sorted.cu │ ├── is_sorted_until.cu │ ├── logical.cu │ ├── max_element.cu │ ├── memory.cu │ ├── merge.cu │ ├── merge_by_key.cu │ ├── merge_sort.cu │ ├── min_element.cu │ ├── minmax_element.cu │ ├── mismatch.cu │ ├── pair_sort.cu │ ├── pair_sort_by_key.cu │ ├── partition.cu │ ├── partition_point.cu │ ├── reduce.cu │ ├── reduce_by_key.cu │ ├── remove.cu │ ├── replace.cu │ ├── reverse.cu │ ├── scan.cu │ ├── scan_by_key.cu │ ├── scatter.cu │ ├── sequence.cu │ ├── set_difference.cu │ ├── set_difference_by_key.cu │ ├── set_intersection.cu │ ├── set_intersection_by_key.cu │ ├── set_symmetric_difference.cu │ ├── set_symmetric_difference_by_key.cu │ ├── set_union.cu │ ├── set_union_by_key.cu │ ├── sort.cu │ ├── sort_by_key.cu │ ├── stream_legacy.cu │ ├── stream_per_thread.cmake │ ├── stream_per_thread.cu │ ├── swap_ranges.cu │ ├── tabulate.cu │ ├── transform.cu │ ├── transform_reduce.cu │ ├── transform_scan.cu │ ├── uninitialized_copy.cu │ ├── uninitialized_fill.cu │ ├── unique.cu │ └── unique_by_key.cu ├── decompose.cu ├── dependencies_aware_policies.cu ├── dereference.cu ├── device_delete.cu ├── device_ptr.cu ├── device_reference.cu ├── discard_iterator.cu ├── distance.cu ├── docs │ └── doxybook_test.h ├── equal.cu ├── event.cu ├── fill.cu ├── find.cu ├── for_each.cu ├── functional.cu ├── functional_arithmetic.cu ├── functional_bitwise.cu ├── functional_logical.cu ├── functional_placeholders_arithmetic.cu ├── functional_placeholders_bitwise.cu ├── functional_placeholders_compound_assignment.cu ├── functional_placeholders_logical.cu ├── functional_placeholders_miscellaneous.cu ├── functional_placeholders_relational.cu ├── future.cu ├── gather.cu ├── generate.cu ├── generate_const_iterators.cu ├── inner_product.cu ├── is_contiguous_iterator.cu ├── is_operator_function_object.cu ├── is_partitioned.cu ├── is_sorted.cu ├── is_sorted_until.cu ├── logical.cu ├── max_element.cu ├── memory.cu ├── merge.cu ├── merge_by_key.cu ├── merge_key_value.cu ├── metaprogamming.cu ├── min_and_max.cu ├── min_element.cu ├── minmax_element.cu ├── mismatch.cu ├── mr_disjoint_pool.cu ├── mr_new.cu ├── mr_pool.cu ├── mr_pool_options.cu ├── namespace_wrapped.cu ├── omp │ ├── CMakeLists.txt │ ├── nvcc_independence.cpp │ └── reduce_intervals.cu ├── out_of_memory_recovery.cu ├── pair.cu ├── pair_reduce.cu ├── pair_scan.cu ├── pair_scan_by_key.cu ├── pair_sort.cu ├── pair_sort_by_key.cu ├── pair_transform.cu ├── partition.cu ├── partition_point.cu ├── permutation_iterator.cu ├── preprocessor.cu ├── random.cu ├── reduce.cu ├── reduce_by_key.cu ├── reduce_large.cu ├── remove.cu ├── replace.cu ├── reverse.cu ├── reverse_iterator.cu ├── scan.cu ├── scan_by_key.exclusive.cu ├── scan_by_key.inclusive.cu ├── scatter.cu ├── sequence.cu ├── set_difference.cu ├── set_difference_by_key.cu ├── set_difference_by_key_descending.cu ├── set_difference_descending.cu ├── set_difference_key_value.cu ├── set_intersection.cu ├── set_intersection_by_key.cu ├── set_intersection_by_key_descending.cu ├── set_intersection_descending.cu ├── set_intersection_key_value.cu ├── set_symmetric_difference.cu ├── set_symmetric_difference_by_key.cu ├── set_symmetric_difference_by_key_descending.cu ├── set_symmetric_difference_descending.cu ├── set_union.cu ├── set_union_by_key.cu ├── set_union_by_key_descending.cu ├── set_union_descending.cu ├── set_union_key_value.cu ├── shuffle.cu ├── sort.cu ├── sort_by_key.cu ├── sort_by_key_variable_bits.cu ├── sort_permutation_iterator.cu ├── sort_variable_bits.cu ├── stable_sort.cu ├── stable_sort_by_key.cu ├── stable_sort_by_key_large_keys.cu ├── stable_sort_by_key_large_keys_and_values.cu ├── stable_sort_by_key_large_values.cu ├── stable_sort_large.cu ├── swap_ranges.cu ├── tabulate.cu ├── transform.cu ├── transform_input_output_iterator.cu ├── transform_iterator.cu ├── transform_output_iterator.cu ├── transform_output_iterator_reduce_by_key.cu ├── transform_reduce.cu ├── transform_scan.cu ├── trivial_sequence.cu ├── tuple.cu ├── tuple_algorithms.cu ├── tuple_reduce.cu ├── tuple_scan.cu ├── tuple_sort.cu ├── tuple_transform.cu ├── type_traits.cu ├── uninitialized_copy.cu ├── uninitialized_fill.cu ├── unique.cu ├── unique_by_key.cu ├── unittest │ ├── CMakeLists.txt │ ├── assertions.h │ ├── ctest.h │ ├── cuda │ │ ├── testframework.cu │ │ └── testframework.h │ ├── exceptions.h │ ├── hip │ │ ├── testframework.cu │ │ └── testframework.h │ ├── meta.h │ ├── random.h │ ├── runtime_static_assert.h │ ├── special_types.h │ ├── system.h │ ├── testframework.cu │ ├── testframework.h │ ├── unittest.h │ ├── util.h │ └── util_async.h ├── unittest_static_assert.cu ├── unittest_tester.cu ├── universal_memory.cu ├── vector.cu ├── vector_allocators.cu ├── vector_insert.cu ├── vector_manipulation.cu ├── zip_function.cu ├── zip_iterator.cu ├── zip_iterator_reduce.cu ├── zip_iterator_reduce_by_key.cu ├── zip_iterator_scan.cu ├── zip_iterator_sort.cu └── zip_iterator_sort_by_key.cu ├── thrust ├── CMakeLists.txt ├── addressof.h ├── adjacent_difference.h ├── advance.h ├── allocate_unique.h ├── async │ ├── copy.h │ ├── for_each.h │ ├── reduce.h │ ├── scan.h │ ├── sort.h │ └── transform.h ├── binary_search.h ├── cmake │ ├── FindTBB.cmake │ ├── README.md │ ├── thrust-config-version.cmake │ ├── thrust-config.cmake │ ├── thrust-header-search.cmake │ └── thrust-header-search.cmake.in ├── complex.h ├── copy.h ├── count.h ├── detail │ ├── adjacent_difference.inl │ ├── advance.inl │ ├── algorithm_wrapper.h │ ├── alignment.h │ ├── allocator │ │ ├── allocator_traits.h │ │ ├── allocator_traits.inl │ │ ├── copy_construct_range.h │ │ ├── copy_construct_range.inl │ │ ├── default_construct_range.h │ │ ├── default_construct_range.inl │ │ ├── destroy_range.h │ │ ├── destroy_range.inl │ │ ├── fill_construct_range.h │ │ ├── fill_construct_range.inl │ │ ├── malloc_allocator.h │ │ ├── malloc_allocator.inl │ │ ├── no_throw_allocator.h │ │ ├── tagged_allocator.h │ │ ├── tagged_allocator.inl │ │ ├── temporary_allocator.h │ │ └── temporary_allocator.inl │ ├── allocator_aware_execution_policy.h │ ├── binary_search.inl │ ├── caching_allocator.h │ ├── complex │ │ ├── arithmetic.h │ │ ├── c99math.h │ │ ├── catrig.h │ │ ├── catrigf.h │ │ ├── ccosh.h │ │ ├── ccoshf.h │ │ ├── cexp.h │ │ ├── cexpf.h │ │ ├── clog.h │ │ ├── clogf.h │ │ ├── complex.inl │ │ ├── cpow.h │ │ ├── cproj.h │ │ ├── csinh.h │ │ ├── csinhf.h │ │ ├── csqrt.h │ │ ├── csqrtf.h │ │ ├── ctanh.h │ │ ├── ctanhf.h │ │ ├── math_private.h │ │ └── stream.h │ ├── config.h │ ├── config │ │ ├── compiler.h │ │ ├── compiler_fence.h │ │ ├── config.h │ │ ├── cpp_compatibility.h │ │ ├── cpp_dialect.h │ │ ├── deprecated.h │ │ ├── device_system.h │ │ ├── diagnostic.h │ │ ├── execution_space.h │ │ ├── forceinline.h │ │ ├── global_workarounds.h │ │ ├── host_device.h │ │ ├── host_system.h │ │ ├── memory_resource.h │ │ ├── namespace.h │ │ └── simple_defines.h │ ├── contiguous_storage.h │ ├── contiguous_storage.inl │ ├── copy.h │ ├── copy.inl │ ├── copy_if.h │ ├── copy_if.inl │ ├── count.h │ ├── count.inl │ ├── cpp_version_check.h │ ├── dependencies_aware_execution_policy.h │ ├── device_delete.inl │ ├── device_free.inl │ ├── device_malloc.inl │ ├── device_new.inl │ ├── device_ptr.inl │ ├── distance.inl │ ├── equal.inl │ ├── event_error.h │ ├── execute_with_allocator.h │ ├── execute_with_allocator_fwd.h │ ├── execute_with_dependencies.h │ ├── execution_policy.h │ ├── extrema.inl │ ├── fill.inl │ ├── find.inl │ ├── for_each.inl │ ├── function.h │ ├── functional.inl │ ├── functional │ │ ├── actor.h │ │ ├── actor.inl │ │ ├── argument.h │ │ ├── composite.h │ │ ├── operators.h │ │ ├── operators │ │ │ ├── arithmetic_operators.h │ │ │ ├── assignment_operator.h │ │ │ ├── bitwise_operators.h │ │ │ ├── compound_assignment_operators.h │ │ │ ├── logical_operators.h │ │ │ ├── operator_adaptors.h │ │ │ └── relational_operators.h │ │ ├── placeholder.h │ │ └── value.h │ ├── gather.inl │ ├── generate.inl │ ├── get_iterator_value.h │ ├── inner_product.inl │ ├── integer_math.h │ ├── integer_traits.h │ ├── internal_functional.h │ ├── logical.inl │ ├── malloc_and_free.h │ ├── malloc_and_free_fwd.h │ ├── memory_algorithms.h │ ├── memory_wrapper.h │ ├── merge.inl │ ├── minmax.h │ ├── mismatch.inl │ ├── modern_gcc_required.h │ ├── mpl │ │ └── math.h │ ├── numeric_traits.h │ ├── numeric_wrapper.h │ ├── nv_target.h │ ├── overlapped_copy.h │ ├── pair.inl │ ├── partition.inl │ ├── pointer.h │ ├── pointer.inl │ ├── preprocessor.h │ ├── range │ │ ├── head_flags.h │ │ └── tail_flags.h │ ├── raw_pointer_cast.h │ ├── raw_reference_cast.h │ ├── reduce.inl │ ├── reference.h │ ├── reference_forward_declaration.h │ ├── remove.inl │ ├── replace.inl │ ├── reverse.inl │ ├── scan.inl │ ├── scatter.inl │ ├── select_system.h │ ├── seq.h │ ├── sequence.inl │ ├── set_operations.inl │ ├── shuffle.inl │ ├── sort.inl │ ├── static_assert.h │ ├── static_map.h │ ├── swap.h │ ├── swap.inl │ ├── swap_ranges.inl │ ├── tabulate.inl │ ├── temporary_array.h │ ├── temporary_array.inl │ ├── temporary_buffer.h │ ├── transform.inl │ ├── transform_reduce.inl │ ├── transform_scan.inl │ ├── trivial_sequence.h │ ├── tuple.inl │ ├── tuple_algorithms.h │ ├── tuple_meta_transform.h │ ├── tuple_transform.h │ ├── type_deduction.h │ ├── type_traits.h │ ├── type_traits │ │ ├── function_traits.h │ │ ├── has_member_function.h │ │ ├── has_nested_type.h │ │ ├── has_trivial_assign.h │ │ ├── is_call_possible.h │ │ ├── is_metafunction_defined.h │ │ ├── iterator │ │ │ ├── is_discard_iterator.h │ │ │ └── is_output_iterator.h │ │ ├── minimum_type.h │ │ ├── pointer_traits.h │ │ └── result_of_adaptable_function.h │ ├── uninitialized_copy.inl │ ├── uninitialized_fill.inl │ ├── unique.inl │ ├── use_default.h │ ├── util │ │ └── align.h │ ├── vector_base.h │ └── vector_base.inl ├── device_allocator.h ├── device_delete.h ├── device_free.h ├── device_make_unique.h ├── device_malloc.h ├── device_malloc_allocator.h ├── device_new.h ├── device_new_allocator.h ├── device_ptr.h ├── device_reference.h ├── device_vector.h ├── distance.h ├── equal.h ├── event.h ├── execution_policy.h ├── extrema.h ├── fill.h ├── find.h ├── for_each.h ├── functional.h ├── future.h ├── gather.h ├── generate.h ├── host_vector.h ├── inner_product.h ├── iterator │ ├── constant_iterator.h │ ├── counting_iterator.h │ ├── detail │ │ ├── any_assign.h │ │ ├── any_system_tag.h │ │ ├── constant_iterator_base.h │ │ ├── counting_iterator.inl │ │ ├── device_system_tag.h │ │ ├── discard_iterator_base.h │ │ ├── distance_from_result.h │ │ ├── host_system_tag.h │ │ ├── is_iterator_category.h │ │ ├── iterator_adaptor_base.h │ │ ├── iterator_category_to_system.h │ │ ├── iterator_category_to_traversal.h │ │ ├── iterator_category_with_system_and_traversal.h │ │ ├── iterator_facade_category.h │ │ ├── iterator_traits.inl │ │ ├── iterator_traversal_tags.h │ │ ├── join_iterator.h │ │ ├── minimum_category.h │ │ ├── minimum_system.h │ │ ├── normal_iterator.h │ │ ├── permutation_iterator_base.h │ │ ├── retag.h │ │ ├── reverse_iterator.inl │ │ ├── reverse_iterator_base.h │ │ ├── tagged_iterator.h │ │ ├── transform_input_output_iterator.inl │ │ ├── transform_iterator.inl │ │ ├── transform_output_iterator.inl │ │ ├── tuple_of_iterator_references.h │ │ ├── universal_categories.h │ │ ├── zip_iterator.inl │ │ └── zip_iterator_base.h │ ├── discard_iterator.h │ ├── iterator_adaptor.h │ ├── iterator_categories.h │ ├── iterator_facade.h │ ├── iterator_traits.h │ ├── permutation_iterator.h │ ├── retag.h │ ├── reverse_iterator.h │ ├── transform_input_output_iterator.h │ ├── transform_iterator.h │ ├── transform_output_iterator.h │ └── zip_iterator.h ├── limits.h ├── logical.h ├── memory.h ├── merge.h ├── mismatch.h ├── mr │ ├── allocator.h │ ├── device_memory_resource.h │ ├── disjoint_pool.h │ ├── disjoint_sync_pool.h │ ├── disjoint_tls_pool.h │ ├── fancy_pointer_resource.h │ ├── host_memory_resource.h │ ├── memory_resource.h │ ├── new.h │ ├── polymorphic_adaptor.h │ ├── pool.h │ ├── pool_options.h │ ├── sync_pool.h │ ├── tls_pool.h │ ├── universal_memory_resource.h │ └── validator.h ├── optional.h ├── pair.h ├── partition.h ├── per_device_resource.h ├── random.h ├── random │ ├── detail │ │ ├── discard_block_engine.inl │ │ ├── erfcinv.h │ │ ├── linear_congruential_engine.inl │ │ ├── linear_congruential_engine_discard.h │ │ ├── linear_feedback_shift_engine.inl │ │ ├── linear_feedback_shift_engine_wordmask.h │ │ ├── mod.h │ │ ├── normal_distribution.inl │ │ ├── normal_distribution_base.h │ │ ├── random_core_access.h │ │ ├── subtract_with_carry_engine.inl │ │ ├── uniform_int_distribution.inl │ │ ├── uniform_real_distribution.inl │ │ ├── xor_combine_engine.inl │ │ └── xor_combine_engine_max.h │ ├── discard_block_engine.h │ ├── linear_congruential_engine.h │ ├── linear_feedback_shift_engine.h │ ├── normal_distribution.h │ ├── subtract_with_carry_engine.h │ ├── uniform_int_distribution.h │ ├── uniform_real_distribution.h │ └── xor_combine_engine.h ├── reduce.h ├── remove.h ├── replace.h ├── reverse.h ├── rocthrust_version.hpp.in ├── scan.h ├── scatter.h ├── sequence.h ├── sequence_access.h ├── set_operations.h ├── shuffle.h ├── sort.h ├── swap.h ├── system │ ├── cpp │ │ ├── detail │ │ │ ├── adjacent_difference.h │ │ │ ├── assign_value.h │ │ │ ├── binary_search.h │ │ │ ├── copy.h │ │ │ ├── copy_if.h │ │ │ ├── count.h │ │ │ ├── equal.h │ │ │ ├── execution_policy.h │ │ │ ├── extrema.h │ │ │ ├── fill.h │ │ │ ├── find.h │ │ │ ├── for_each.h │ │ │ ├── gather.h │ │ │ ├── generate.h │ │ │ ├── get_value.h │ │ │ ├── inner_product.h │ │ │ ├── iter_swap.h │ │ │ ├── logical.h │ │ │ ├── malloc_and_free.h │ │ │ ├── memory.inl │ │ │ ├── merge.h │ │ │ ├── mismatch.h │ │ │ ├── par.h │ │ │ ├── partition.h │ │ │ ├── per_device_resource.h │ │ │ ├── reduce.h │ │ │ ├── reduce_by_key.h │ │ │ ├── remove.h │ │ │ ├── replace.h │ │ │ ├── reverse.h │ │ │ ├── scan.h │ │ │ ├── scan_by_key.h │ │ │ ├── scatter.h │ │ │ ├── sequence.h │ │ │ ├── set_operations.h │ │ │ ├── sort.h │ │ │ ├── swap_ranges.h │ │ │ ├── tabulate.h │ │ │ ├── temporary_buffer.h │ │ │ ├── transform.h │ │ │ ├── transform_reduce.h │ │ │ ├── transform_scan.h │ │ │ ├── uninitialized_copy.h │ │ │ ├── uninitialized_fill.h │ │ │ ├── unique.h │ │ │ ├── unique_by_key.h │ │ │ └── vector.inl │ │ ├── execution_policy.h │ │ ├── memory.h │ │ ├── memory_resource.h │ │ ├── pointer.h │ │ └── vector.h │ ├── cuda │ │ ├── config.h │ │ ├── detail │ │ │ ├── adjacent_difference.h │ │ │ ├── assign_value.h │ │ │ ├── async │ │ │ │ ├── copy.h │ │ │ │ ├── customization.h │ │ │ │ ├── exclusive_scan.h │ │ │ │ ├── for_each.h │ │ │ │ ├── inclusive_scan.h │ │ │ │ ├── reduce.h │ │ │ │ ├── scan.h │ │ │ │ ├── sort.h │ │ │ │ └── transform.h │ │ │ ├── binary_search.h │ │ │ ├── cdp_dispatch.h │ │ │ ├── copy.h │ │ │ ├── copy_if.h │ │ │ ├── core │ │ │ │ ├── agent_launcher.h │ │ │ │ ├── triple_chevron_launch.h │ │ │ │ └── util.h │ │ │ ├── count.h │ │ │ ├── cross_system.h │ │ │ ├── dispatch.h │ │ │ ├── equal.h │ │ │ ├── error.inl │ │ │ ├── execution_policy.h │ │ │ ├── extrema.h │ │ │ ├── fill.h │ │ │ ├── find.h │ │ │ ├── for_each.h │ │ │ ├── future.inl │ │ │ ├── gather.h │ │ │ ├── generate.h │ │ │ ├── get_value.h │ │ │ ├── inner_product.h │ │ │ ├── internal │ │ │ │ ├── copy_cross_system.h │ │ │ │ └── copy_device_to_device.h │ │ │ ├── iter_swap.h │ │ │ ├── logical.h │ │ │ ├── make_unsigned_special.h │ │ │ ├── malloc_and_free.h │ │ │ ├── memory.inl │ │ │ ├── merge.h │ │ │ ├── mismatch.h │ │ │ ├── par.h │ │ │ ├── par_to_seq.h │ │ │ ├── parallel_for.h │ │ │ ├── partition.h │ │ │ ├── per_device_resource.h │ │ │ ├── reduce.h │ │ │ ├── reduce_by_key.h │ │ │ ├── remove.h │ │ │ ├── replace.h │ │ │ ├── reverse.h │ │ │ ├── scan.h │ │ │ ├── scan_by_key.h │ │ │ ├── scatter.h │ │ │ ├── sequence.h │ │ │ ├── set_operations.h │ │ │ ├── sort.h │ │ │ ├── swap_ranges.h │ │ │ ├── tabulate.h │ │ │ ├── temporary_buffer.h │ │ │ ├── terminate.h │ │ │ ├── transform.h │ │ │ ├── transform_reduce.h │ │ │ ├── transform_scan.h │ │ │ ├── uninitialized_copy.h │ │ │ ├── uninitialized_fill.h │ │ │ ├── unique.h │ │ │ ├── unique_by_key.h │ │ │ └── util.h │ │ ├── error.h │ │ ├── execution_policy.h │ │ ├── future.h │ │ ├── memory.h │ │ ├── memory_resource.h │ │ ├── pointer.h │ │ └── vector.h │ ├── detail │ │ ├── adl │ │ │ ├── adjacent_difference.h │ │ │ ├── assign_value.h │ │ │ ├── async │ │ │ │ ├── copy.h │ │ │ │ ├── for_each.h │ │ │ │ ├── reduce.h │ │ │ │ ├── scan.h │ │ │ │ ├── sort.h │ │ │ │ └── transform.h │ │ │ ├── binary_search.h │ │ │ ├── copy.h │ │ │ ├── copy_if.h │ │ │ ├── count.h │ │ │ ├── equal.h │ │ │ ├── extrema.h │ │ │ ├── fill.h │ │ │ ├── find.h │ │ │ ├── for_each.h │ │ │ ├── gather.h │ │ │ ├── generate.h │ │ │ ├── get_value.h │ │ │ ├── inner_product.h │ │ │ ├── iter_swap.h │ │ │ ├── logical.h │ │ │ ├── malloc_and_free.h │ │ │ ├── merge.h │ │ │ ├── mismatch.h │ │ │ ├── partition.h │ │ │ ├── per_device_resource.h │ │ │ ├── reduce.h │ │ │ ├── reduce_by_key.h │ │ │ ├── remove.h │ │ │ ├── replace.h │ │ │ ├── reverse.h │ │ │ ├── scan.h │ │ │ ├── scan_by_key.h │ │ │ ├── scatter.h │ │ │ ├── sequence.h │ │ │ ├── set_operations.h │ │ │ ├── sort.h │ │ │ ├── swap_ranges.h │ │ │ ├── tabulate.h │ │ │ ├── temporary_buffer.h │ │ │ ├── transform.h │ │ │ ├── transform_reduce.h │ │ │ ├── transform_scan.h │ │ │ ├── uninitialized_copy.h │ │ │ ├── uninitialized_fill.h │ │ │ ├── unique.h │ │ │ └── unique_by_key.h │ │ ├── bad_alloc.h │ │ ├── errno.h │ │ ├── error_category.inl │ │ ├── error_code.inl │ │ ├── error_condition.inl │ │ ├── generic │ │ │ ├── adjacent_difference.h │ │ │ ├── adjacent_difference.inl │ │ │ ├── advance.h │ │ │ ├── advance.inl │ │ │ ├── binary_search.h │ │ │ ├── binary_search.inl │ │ │ ├── copy.h │ │ │ ├── copy.inl │ │ │ ├── copy_if.h │ │ │ ├── copy_if.inl │ │ │ ├── count.h │ │ │ ├── count.inl │ │ │ ├── distance.h │ │ │ ├── distance.inl │ │ │ ├── equal.h │ │ │ ├── equal.inl │ │ │ ├── extrema.h │ │ │ ├── extrema.inl │ │ │ ├── fill.h │ │ │ ├── find.h │ │ │ ├── find.inl │ │ │ ├── for_each.h │ │ │ ├── gather.h │ │ │ ├── gather.inl │ │ │ ├── generate.h │ │ │ ├── generate.inl │ │ │ ├── inner_product.h │ │ │ ├── inner_product.inl │ │ │ ├── logical.h │ │ │ ├── memory.h │ │ │ ├── memory.inl │ │ │ ├── merge.h │ │ │ ├── merge.inl │ │ │ ├── mismatch.h │ │ │ ├── mismatch.inl │ │ │ ├── partition.h │ │ │ ├── partition.inl │ │ │ ├── per_device_resource.h │ │ │ ├── reduce.h │ │ │ ├── reduce.inl │ │ │ ├── reduce_by_key.h │ │ │ ├── reduce_by_key.inl │ │ │ ├── remove.h │ │ │ ├── remove.inl │ │ │ ├── replace.h │ │ │ ├── replace.inl │ │ │ ├── reverse.h │ │ │ ├── reverse.inl │ │ │ ├── scalar │ │ │ │ ├── binary_search.h │ │ │ │ └── binary_search.inl │ │ │ ├── scan.h │ │ │ ├── scan.inl │ │ │ ├── scan_by_key.h │ │ │ ├── scan_by_key.inl │ │ │ ├── scatter.h │ │ │ ├── scatter.inl │ │ │ ├── select_system.h │ │ │ ├── select_system.inl │ │ │ ├── select_system_exists.h │ │ │ ├── sequence.h │ │ │ ├── sequence.inl │ │ │ ├── set_operations.h │ │ │ ├── set_operations.inl │ │ │ ├── shuffle.h │ │ │ ├── shuffle.inl │ │ │ ├── sort.h │ │ │ ├── sort.inl │ │ │ ├── swap_ranges.h │ │ │ ├── swap_ranges.inl │ │ │ ├── tabulate.h │ │ │ ├── tabulate.inl │ │ │ ├── tag.h │ │ │ ├── temporary_buffer.h │ │ │ ├── temporary_buffer.inl │ │ │ ├── transform.h │ │ │ ├── transform.inl │ │ │ ├── transform_reduce.h │ │ │ ├── transform_reduce.inl │ │ │ ├── transform_scan.h │ │ │ ├── transform_scan.inl │ │ │ ├── uninitialized_copy.h │ │ │ ├── uninitialized_copy.inl │ │ │ ├── uninitialized_fill.h │ │ │ ├── uninitialized_fill.inl │ │ │ ├── unique.h │ │ │ ├── unique.inl │ │ │ ├── unique_by_key.h │ │ │ └── unique_by_key.inl │ │ ├── internal │ │ │ └── decompose.h │ │ ├── sequential │ │ │ ├── adjacent_difference.h │ │ │ ├── assign_value.h │ │ │ ├── binary_search.h │ │ │ ├── copy.h │ │ │ ├── copy.inl │ │ │ ├── copy_backward.h │ │ │ ├── copy_if.h │ │ │ ├── count.h │ │ │ ├── equal.h │ │ │ ├── execution_policy.h │ │ │ ├── extrema.h │ │ │ ├── fill.h │ │ │ ├── find.h │ │ │ ├── for_each.h │ │ │ ├── gather.h │ │ │ ├── general_copy.h │ │ │ ├── generate.h │ │ │ ├── get_value.h │ │ │ ├── inner_product.h │ │ │ ├── insertion_sort.h │ │ │ ├── iter_swap.h │ │ │ ├── logical.h │ │ │ ├── malloc_and_free.h │ │ │ ├── merge.h │ │ │ ├── merge.inl │ │ │ ├── mismatch.h │ │ │ ├── partition.h │ │ │ ├── per_device_resource.h │ │ │ ├── reduce.h │ │ │ ├── reduce_by_key.h │ │ │ ├── remove.h │ │ │ ├── replace.h │ │ │ ├── reverse.h │ │ │ ├── scan.h │ │ │ ├── scan_by_key.h │ │ │ ├── scatter.h │ │ │ ├── sequence.h │ │ │ ├── set_operations.h │ │ │ ├── sort.h │ │ │ ├── sort.inl │ │ │ ├── stable_merge_sort.h │ │ │ ├── stable_merge_sort.inl │ │ │ ├── stable_primitive_sort.h │ │ │ ├── stable_primitive_sort.inl │ │ │ ├── stable_radix_sort.h │ │ │ ├── stable_radix_sort.inl │ │ │ ├── swap_ranges.h │ │ │ ├── tabulate.h │ │ │ ├── temporary_buffer.h │ │ │ ├── transform.h │ │ │ ├── transform_reduce.h │ │ │ ├── transform_scan.h │ │ │ ├── trivial_copy.h │ │ │ ├── uninitialized_copy.h │ │ │ ├── uninitialized_fill.h │ │ │ ├── unique.h │ │ │ └── unique_by_key.h │ │ └── system_error.inl │ ├── error_code.h │ ├── hip │ │ ├── config.h │ │ ├── detail │ │ │ ├── adjacent_difference.h │ │ │ ├── assign_value.h │ │ │ ├── async │ │ │ │ ├── copy.h │ │ │ │ ├── customization.h │ │ │ │ ├── exclusive_scan.h │ │ │ │ ├── for_each.h │ │ │ │ ├── inclusive_scan.h │ │ │ │ ├── reduce.h │ │ │ │ ├── scan.h │ │ │ │ ├── sort.h │ │ │ │ └── transform.h │ │ │ ├── binary_search.h │ │ │ ├── copy.h │ │ │ ├── copy_if.h │ │ │ ├── count.h │ │ │ ├── cross_system.h │ │ │ ├── dispatch.h │ │ │ ├── equal.h │ │ │ ├── error.inl │ │ │ ├── execution_policy.h │ │ │ ├── extrema.h │ │ │ ├── fill.h │ │ │ ├── find.h │ │ │ ├── for_each.h │ │ │ ├── future.inl │ │ │ ├── gather.h │ │ │ ├── general │ │ │ │ ├── temp_storage.h │ │ │ │ └── various.h │ │ │ ├── generate.h │ │ │ ├── get_value.h │ │ │ ├── guarded_driver_types.h │ │ │ ├── guarded_hip_runtime_api.h │ │ │ ├── inner_product.h │ │ │ ├── internal │ │ │ │ ├── copy_cross_system.h │ │ │ │ └── copy_device_to_device.h │ │ │ ├── iter_swap.h │ │ │ ├── logical.h │ │ │ ├── make_unsigned_special.h │ │ │ ├── malloc_and_free.h │ │ │ ├── memory.inl │ │ │ ├── merge.h │ │ │ ├── mismatch.h │ │ │ ├── nv │ │ │ │ ├── detail │ │ │ │ │ ├── __preprocessor.h │ │ │ │ │ └── __target_macros.h │ │ │ │ └── target.h │ │ │ ├── par.h │ │ │ ├── par_to_seq.h │ │ │ ├── parallel_for.h │ │ │ ├── partition.h │ │ │ ├── per_device_resource.h │ │ │ ├── reduce.h │ │ │ ├── reduce_by_key.h │ │ │ ├── remove.h │ │ │ ├── replace.h │ │ │ ├── reverse.h │ │ │ ├── scan.h │ │ │ ├── scan_by_key.h │ │ │ ├── scatter.h │ │ │ ├── sequence.h │ │ │ ├── set_operations.h │ │ │ ├── sort.h │ │ │ ├── swap_ranges.h │ │ │ ├── tabulate.h │ │ │ ├── temporary_buffer.h │ │ │ ├── terminate.h │ │ │ ├── transform.h │ │ │ ├── transform_reduce.h │ │ │ ├── transform_scan.h │ │ │ ├── uninitialized_copy.h │ │ │ ├── uninitialized_fill.h │ │ │ ├── unique.h │ │ │ ├── unique_by_key.h │ │ │ └── util.h │ │ ├── error.h │ │ ├── execution_policy.h │ │ ├── future.h │ │ ├── hipstdpar │ │ │ ├── hipstdpar_lib.hpp │ │ │ └── impl │ │ │ │ ├── batch.hpp │ │ │ │ ├── copy.hpp │ │ │ │ ├── generation.hpp │ │ │ │ ├── heap.hpp │ │ │ │ ├── hipstd.hpp │ │ │ │ ├── interpose_allocations.hpp │ │ │ │ ├── lexicographical_comparison.hpp │ │ │ │ ├── merge.hpp │ │ │ │ ├── min_max.hpp │ │ │ │ ├── numeric.hpp │ │ │ │ ├── order_changing.hpp │ │ │ │ ├── partitioning.hpp │ │ │ │ ├── removing.hpp │ │ │ │ ├── search.hpp │ │ │ │ ├── set.hpp │ │ │ │ ├── sorting.hpp │ │ │ │ ├── swap.hpp │ │ │ │ ├── transformation.hpp │ │ │ │ └── uninitialized.hpp │ │ ├── memory.h │ │ ├── memory_resource.h │ │ ├── pointer.h │ │ └── vector.h │ ├── omp │ │ ├── detail │ │ │ ├── adjacent_difference.h │ │ │ ├── assign_value.h │ │ │ ├── binary_search.h │ │ │ ├── copy.h │ │ │ ├── copy.inl │ │ │ ├── copy_if.h │ │ │ ├── copy_if.inl │ │ │ ├── count.h │ │ │ ├── default_decomposition.h │ │ │ ├── default_decomposition.inl │ │ │ ├── equal.h │ │ │ ├── execution_policy.h │ │ │ ├── extrema.h │ │ │ ├── fill.h │ │ │ ├── find.h │ │ │ ├── for_each.h │ │ │ ├── for_each.inl │ │ │ ├── gather.h │ │ │ ├── generate.h │ │ │ ├── get_value.h │ │ │ ├── inner_product.h │ │ │ ├── iter_swap.h │ │ │ ├── logical.h │ │ │ ├── malloc_and_free.h │ │ │ ├── memory.inl │ │ │ ├── merge.h │ │ │ ├── mismatch.h │ │ │ ├── par.h │ │ │ ├── partition.h │ │ │ ├── partition.inl │ │ │ ├── per_device_resource.h │ │ │ ├── pragma_omp.h │ │ │ ├── reduce.h │ │ │ ├── reduce.inl │ │ │ ├── reduce_by_key.h │ │ │ ├── reduce_by_key.inl │ │ │ ├── reduce_intervals.h │ │ │ ├── reduce_intervals.inl │ │ │ ├── remove.h │ │ │ ├── remove.inl │ │ │ ├── replace.h │ │ │ ├── reverse.h │ │ │ ├── scan.h │ │ │ ├── scan_by_key.h │ │ │ ├── scatter.h │ │ │ ├── sequence.h │ │ │ ├── set_operations.h │ │ │ ├── sort.h │ │ │ ├── sort.inl │ │ │ ├── swap_ranges.h │ │ │ ├── tabulate.h │ │ │ ├── temporary_buffer.h │ │ │ ├── transform.h │ │ │ ├── transform_reduce.h │ │ │ ├── transform_scan.h │ │ │ ├── uninitialized_copy.h │ │ │ ├── uninitialized_fill.h │ │ │ ├── unique.h │ │ │ ├── unique.inl │ │ │ ├── unique_by_key.h │ │ │ └── unique_by_key.inl │ │ ├── execution_policy.h │ │ ├── memory.h │ │ ├── memory_resource.h │ │ ├── pointer.h │ │ └── vector.h │ ├── system_error.h │ └── tbb │ │ ├── detail │ │ ├── adjacent_difference.h │ │ ├── assign_value.h │ │ ├── binary_search.h │ │ ├── copy.h │ │ ├── copy.inl │ │ ├── copy_if.h │ │ ├── copy_if.inl │ │ ├── count.h │ │ ├── equal.h │ │ ├── execution_policy.h │ │ ├── extrema.h │ │ ├── fill.h │ │ ├── find.h │ │ ├── for_each.h │ │ ├── for_each.inl │ │ ├── gather.h │ │ ├── generate.h │ │ ├── get_value.h │ │ ├── inner_product.h │ │ ├── iter_swap.h │ │ ├── logical.h │ │ ├── malloc_and_free.h │ │ ├── memory.inl │ │ ├── merge.h │ │ ├── merge.inl │ │ ├── mismatch.h │ │ ├── par.h │ │ ├── partition.h │ │ ├── partition.inl │ │ ├── per_device_resource.h │ │ ├── reduce.h │ │ ├── reduce.inl │ │ ├── reduce_by_key.h │ │ ├── reduce_by_key.inl │ │ ├── reduce_intervals.h │ │ ├── remove.h │ │ ├── remove.inl │ │ ├── replace.h │ │ ├── reverse.h │ │ ├── scan.h │ │ ├── scan.inl │ │ ├── scan_by_key.h │ │ ├── scatter.h │ │ ├── sequence.h │ │ ├── set_operations.h │ │ ├── sort.h │ │ ├── sort.inl │ │ ├── swap_ranges.h │ │ ├── tabulate.h │ │ ├── temporary_buffer.h │ │ ├── transform.h │ │ ├── transform_reduce.h │ │ ├── transform_scan.h │ │ ├── uninitialized_copy.h │ │ ├── uninitialized_fill.h │ │ ├── unique.h │ │ ├── unique.inl │ │ ├── unique_by_key.h │ │ └── unique_by_key.inl │ │ ├── execution_policy.h │ │ ├── memory.h │ │ ├── memory_resource.h │ │ ├── pointer.h │ │ └── vector.h ├── system_error.h ├── tabulate.h ├── transform.h ├── transform_reduce.h ├── transform_scan.h ├── tuple.h ├── type_traits │ ├── integer_sequence.h │ ├── is_contiguous_iterator.h │ ├── is_execution_policy.h │ ├── is_operator_less_or_greater_function_object.h │ ├── is_operator_plus_function_object.h │ ├── is_trivially_relocatable.h │ ├── logical_metafunctions.h │ ├── remove_cvref.h │ └── void_t.h ├── uninitialized_copy.h ├── uninitialized_fill.h ├── unique.h ├── universal_allocator.h ├── universal_ptr.h ├── universal_vector.h ├── version.h └── zip_function.h ├── toolchain-linux.cmake └── toolchain-windows.cmake /.azuredevops/rocm-ci.yml: -------------------------------------------------------------------------------- 1 | resources: 2 | repositories: 3 | - repository: pipelines_repo 4 | type: github 5 | endpoint: ROCm 6 | name: ROCm/ROCm 7 | 8 | variables: 9 | - group: common 10 | - template: /.azuredevops/variables-global.yml@pipelines_repo 11 | 12 | trigger: 13 | batch: true 14 | branches: 15 | include: 16 | - develop 17 | - mainline 18 | paths: 19 | exclude: 20 | - .githooks 21 | - .github 22 | - .jenkins 23 | - doc 24 | - docs 25 | - '.*.y*ml' 26 | - '*.md' 27 | - LICENSE 28 | - NOTICES.txt 29 | 30 | pr: 31 | autoCancel: true 32 | branches: 33 | include: 34 | - develop 35 | - mainline 36 | paths: 37 | exclude: 38 | - .githooks 39 | - .github 40 | - .jenkins 41 | - doc 42 | - docs 43 | - '.*.y*ml' 44 | - '*.md' 45 | - LICENSE 46 | - NOTICES.txt 47 | drafts: false 48 | 49 | jobs: 50 | - template: ${{ variables.CI_COMPONENT_PATH }}/rocThrust.yml@pipelines_repo 51 | -------------------------------------------------------------------------------- /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # Exclude these commits from git-blame and similar tools. 2 | # 3 | # To use this file, run the following command from the repo root: 4 | # 5 | # ``` 6 | # $ git config blame.ignoreRevsFile .git-blame-ignore-revs 7 | # ``` 8 | # 9 | # Include a brief comment with each commit added, for example: 10 | # 11 | # ``` 12 | # d92d9f8baac5ec48a8f8718dd69f415a45efe372 # Initial clang-format 13 | # ``` 14 | # 15 | # Only add commits that are pure formatting changes (e.g. 16 | # clang-format version changes, etc). 17 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pdf binary 2 | *.doc binary 3 | *.docx binary 4 | *.ppt binary 5 | *.pptx binary 6 | *.xls binary 7 | *.xlsx binary 8 | *.xps binary 9 | -------------------------------------------------------------------------------- /.githooks/install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd "$(git rev-parse --git-dir)" 4 | cd hooks 5 | 6 | echo "Installing hooks..." 7 | ln -s ../../.githooks/pre-commit pre-commit 8 | echo "Done!" 9 | -------------------------------------------------------------------------------- /.githooks/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Redirect output to stderr. 4 | exec 1>&2 5 | 6 | check_failed=false 7 | 8 | # Do the copyright check 9 | # update & apply copyright when hook config is set, otherwise just verify 10 | opts="-qc" 11 | if [ "$(git config --get --type bool --default false hooks.updateCopyright)" = "true" ]; then 12 | opts="-qca" 13 | fi 14 | 15 | if ! "$(git rev-parse --show-toplevel)/scripts/copyright-date/check-copyright.sh" "$opts" 1>&2; then 16 | printf "\n\033[31mFailed\033[0m: copyright date check.\n" 17 | check_failed=true 18 | fi 19 | 20 | if $check_failed; then 21 | printf " 22 | Pre-commit check failed, please fix the reported errors. 23 | Note: Use '\033[33mgit commit --no-verify\033[0m' to bypass checks.\n" 24 | exit 1 25 | fi 26 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @stanleytsang-amd @umfranzw @RobsonRLemos @lawruble13 2 | # Documentation files 3 | docs/ @ROCm/rocm-documentation 4 | *.md @ROCm/rocm-documentation 5 | *.rst @ROCm/rocm-documentation 6 | .readthedocs.yaml @ROCm/rocm-documentation 7 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "pip" # See documentation for possible values 9 | directory: "/docs/sphinx" # Location of package manifests 10 | open-pull-requests-limit: 10 11 | schedule: 12 | interval: "daily" 13 | labels: 14 | - "documentation" 15 | - "dependencies" 16 | - "ci:docs-only" 17 | reviewers: 18 | - "samjwu" 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### Build dirs ### 2 | build/ 3 | 4 | # Created by https://www.gitignore.io/api/c++,cmake 5 | 6 | ### C++ ### 7 | # Prerequisites 8 | *.d 9 | 10 | # Compiled Object files 11 | *.slo 12 | *.lo 13 | *.o 14 | *.obj 15 | 16 | # Precompiled Headers 17 | *.gch 18 | *.pch 19 | 20 | # Compiled Dynamic libraries 21 | *.so 22 | *.dylib 23 | *.dll 24 | 25 | # Fortran module files 26 | *.mod 27 | *.smod 28 | 29 | # Compiled Static libraries 30 | *.lai 31 | *.la 32 | *.a 33 | *.lib 34 | 35 | # Executables 36 | *.exe 37 | *.out 38 | *.app 39 | 40 | ### CMake ### 41 | CMakeCache.txt 42 | CMakeFiles 43 | CMakeScripts 44 | Makefile 45 | cmake_install.cmake 46 | install_manifest.txt 47 | compile_commands.json 48 | CTestTestfile.cmake 49 | thrust/system/cuda/detail/.gitignore 50 | *.bash 51 | run 52 | build* 53 | discrete_voronoi.pgm 54 | 55 | # End of https://www.gitignore.io/api/c++,cmake 56 | 57 | .vscode 58 | docs/_build/doctrees/environment.pickle 59 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | # Read the Docs configuration file 2 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 3 | 4 | version: 2 5 | 6 | sphinx: 7 | configuration: docs/conf.py 8 | 9 | formats: [htmlzip, pdf, epub] 10 | 11 | python: 12 | install: 13 | - requirements: docs/sphinx/requirements.txt 14 | 15 | build: 16 | os: ubuntu-22.04 17 | tools: 18 | python: "mambaforge-22.9" 19 | 20 | conda: 21 | environment: docs/environment.yml 22 | -------------------------------------------------------------------------------- /cmake/DownloadProject.CMakeLists.cmake.in: -------------------------------------------------------------------------------- 1 | # Distributed under the OSI-approved MIT License. See accompanying 2 | # file LICENSE or https://github.com/Crascit/DownloadProject for details. 3 | 4 | cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) 5 | 6 | project(${DL_ARGS_PROJ}-download NONE) 7 | 8 | include(ExternalProject) 9 | if(${DL_ARGS_BUILD_PROJECT}) 10 | ExternalProject_Add(${DL_ARGS_PROJ}-download 11 | ${DL_ARGS_UNPARSED_ARGUMENTS} 12 | SOURCE_DIR "${DL_ARGS_SOURCE_DIR}" 13 | TEST_COMMAND "" 14 | ) 15 | else() 16 | ExternalProject_Add(${DL_ARGS_PROJ}-download 17 | ${DL_ARGS_UNPARSED_ARGUMENTS} 18 | SOURCE_DIR "${DL_ARGS_SOURCE_DIR}" 19 | TEST_COMMAND "" 20 | UPDATE_COMMAND "" 21 | CONFIGURE_COMMAND "" 22 | BUILD_COMMAND "" 23 | INSTALL_COMMAND "" 24 | ) 25 | endif() 26 | -------------------------------------------------------------------------------- /custom.properties: -------------------------------------------------------------------------------- 1 | booktitle=rocTHRUST API Guide 2 | spreadsheet.xml=docs/classification-map.xml 3 | document.locale=enus -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | /_build 2 | /_doxygen 3 | /doxygen/html/ 4 | /doxygen/xml/ 5 | /sphinx/_toc.yml 6 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # This file only contains a selection of the most common options. For a full 4 | # list see the documentation: 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 6 | 7 | import re 8 | 9 | with open("../CMakeLists.txt", encoding="utf-8") as f: 10 | match = re.search(r"rocm_setup_version\(VERSION\s+\"?([0-9.]+)[^0-9.]+", f.read()) 11 | if not match: 12 | raise ValueError("VERSION not found!") 13 | version_number = match[1] 14 | left_nav_title = f"rocThrust {version_number} Documentation" 15 | 16 | # for PDF output on Read the Docs 17 | project = "rocThrust Documentation" 18 | author = "Advanced Micro Devices, Inc." 19 | copyright = "Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All rights reserved." 20 | version = version_number 21 | release = version_number 22 | 23 | external_toc_path = "./sphinx/_toc.yml" 24 | 25 | extensions = ["rocm_docs", "rocm_docs.doxygen"] 26 | html_theme = "rocm_docs_theme" 27 | html_theme_options = {"flavor": "rocm"} 28 | 29 | external_projects_current_project = "rocthrust" 30 | 31 | doxygen_root = "doxygen" 32 | doxygen_project = { 33 | "name": project, 34 | "path": "doxygen/xml", 35 | } 36 | 37 | cpp_id_attributes = ["__device__", "__host__", "THRUST_HOST_DEVICE", "THRUST_HOST", "THRUST_DEVICE"] 38 | -------------------------------------------------------------------------------- /docs/data-type-support.rst: -------------------------------------------------------------------------------- 1 | .. meta:: 2 | :description: rocThrust API data type support 3 | :keywords: rocThrust, ROCm, API, reference, data type, support 4 | 5 | .. _data-type-support: 6 | 7 | ****************************************** 8 | Data type support 9 | ****************************************** 10 | 11 | rocThrust supports user-defined custom types as long as an interface for them is provided. 12 | 13 | rocThrust and Thrust both support the following fundamental types: 14 | 15 | * ``int8`` 16 | * ``int16`` 17 | * ``int32`` 18 | * ``int64`` 19 | * ``float`` 20 | * ``double`` 21 | 22 | 23 | Both rocThrust and Thrust also support ``half`` and ``bfloat16``. However, the host-side HIP implementations of these types are missing some functionality. Because of this, ``half`` and ``bfloat16`` should be used only as storage types to be passed between functions. 24 | 25 | -------------------------------------------------------------------------------- /docs/environment.yml: -------------------------------------------------------------------------------- 1 | name: RTD 2 | channels: 3 | - conda-forge 4 | - defaults 5 | dependencies: 6 | - python=3.10 7 | - pip 8 | - doxygen=1.9.8 9 | - pip: 10 | - -r ./sphinx/requirements.txt 11 | -------------------------------------------------------------------------------- /docs/how-to/use-rocThrust-in-a-project.rst: -------------------------------------------------------------------------------- 1 | .. meta:: 2 | :description: Using rocThrust in a CMake project 3 | :keywords: rocThrust, ROCm, cmake, find_package 4 | 5 | ******************************************* 6 | How to use rocThrust in a CMake project 7 | ******************************************* 8 | 9 | To use rocThrust in your own project, add the following lines to your CMakeLists file: 10 | 11 | .. code:: 12 | 13 | # On ROCm rocThrust requires rocPRIM 14 | find_package(rocprim REQUIRED CONFIG PATHS "/opt/rocm/rocprim") 15 | 16 | # "/opt/rocm" - default install prefix 17 | find_package(rocthrust REQUIRED CONFIG PATHS "/opt/rocm/rocthrust") 18 | 19 | [...] 20 | 21 | # include rocThrust headers and roc::rocprim_hip target 22 | target_link_libraries( roc::rocthrust) 23 | 24 | -------------------------------------------------------------------------------- /docs/install/rocThrust-install-overview.rst: -------------------------------------------------------------------------------- 1 | .. meta:: 2 | :description: rocThrust installation overview 3 | :keywords: install, rocThrust, AMD, ROCm, installation, overview, general 4 | 5 | ********************************* 6 | rocThrust installation overview 7 | ********************************* 8 | 9 | The rocThrust source code is available from the `rocThrust GitHub Repository `_. 10 | 11 | The develop branch is the default branch. The develop branch is intended for users who want to preview new features or contribute to the rocThrust code base. 12 | 13 | If you don't intend to contribute to the rocThrust code base and won't be previewing features, use a branch that matches the version of ROCm installed on your system. 14 | 15 | rocThrust can be built and installed with |install|_ on Linux, |rmake|_ on Windows, or `CMake <./rocThrust-install-with-cmake.html>`_ on Windows and Linux. 16 | 17 | .. |install| replace:: ``install`` 18 | .. _install: ./rocThrust-install-script.html 19 | 20 | .. |rmake| replace:: ``rmake.py`` 21 | .. _rmake: ./rocThrust-rmake-install.html 22 | 23 | CMake provides the most flexibility in building and installing rocThrust. 24 | -------------------------------------------------------------------------------- /docs/install/rocThrust-install-script.rst: -------------------------------------------------------------------------------- 1 | .. meta:: 2 | :description: Build and install rocThrust with the installation script 3 | :keywords: install, building, rocThrust, AMD, ROCm, source code, installation script, Linux 4 | 5 | ******************************************************************** 6 | Building and installing rocThrust on Linux with the install script 7 | ******************************************************************** 8 | 9 | You can use the ``install`` script to build and install rocThrust on Linux. You can also use `CMake <./rocThrust-install-with-cmake.html>`_ if you want more build and installation options. 10 | 11 | The ``install`` script is located in the ``rocThrust`` root directory. To build and install rocThrust with the ``install`` script, run: 12 | 13 | .. code-block:: shell 14 | 15 | ./install --install 16 | 17 | This command will also download and install rocPRIM. 18 | 19 | To build rocThrust and generate tar, zip, and debian packages, run: 20 | 21 | .. code-block:: shell 22 | 23 | ./install --package 24 | 25 | To see a complete list of options, run: 26 | 27 | .. code-block:: shell 28 | 29 | ./install --help 30 | 31 | -------------------------------------------------------------------------------- /docs/install/rocThrust-prerequisites.rst: -------------------------------------------------------------------------------- 1 | .. meta:: 2 | :description: rocThrust Installation Prerequisites 3 | :keywords: installation, rocThrust, AMD, ROCm, prerequisites, dependencies, requirements 4 | 5 | ******************************************************************** 6 | rocThrust prerequisites 7 | ******************************************************************** 8 | 9 | rocThrust has the following prerequisites on all platforms: 10 | 11 | * ROCm 6.1 or later. 12 | * CMake 3.10.2 or later. 13 | * hipcc or amdclag++. See the `ROCm LLVM compiler infrastructure `_ for more information. 14 | * `rocPRIM `_. rocPRIM is automatically downloaded and installed when rocThrust is built and installed. 15 | 16 | rocThrust has the following HIP on Windows prerequisites: 17 | 18 | * Python 3.6 or later 19 | * Visual Studio 2019 with Clang support 20 | * Strawberry Perl 21 | -------------------------------------------------------------------------------- /docs/install/rocThrust-rmake-install.rst: -------------------------------------------------------------------------------- 1 | .. meta:: 2 | :description: Build and install rocThrust with rmake.py 3 | :keywords: install, building, rocThrust, AMD, ROCm, source code, installation script, Windows 4 | 5 | ******************************************************************** 6 | Building and installing rocThrust on Windows with rmake.py 7 | ******************************************************************** 8 | 9 | You can use ``rmake.py`` to build and install rocThrust on Windows. You can also use `CMake <./rocThrust-install-with-cmake.html>`_ if you want more build and installation options. 10 | 11 | ``rmake.py`` is located in the ``rocThrust`` root directory. To build and install rocThrust with ``rmake.py``, run: 12 | 13 | .. code:: shell 14 | 15 | python rmake.py -i 16 | 17 | This command also downloads `rocPRIM `_ and installs it in ``C:\hipSDK``. 18 | 19 | The ``-c`` option builds all clients, including the unit tests: 20 | 21 | .. code:: shell 22 | 23 | python rmake.py -c 24 | 25 | To see a complete list of ``rmake.py`` options, run: 26 | 27 | .. code-block:: shell 28 | 29 | python rmake.py --help 30 | 31 | -------------------------------------------------------------------------------- /docs/license.rst: -------------------------------------------------------------------------------- 1 | .. meta:: 2 | :description: rocThrust API data type support 3 | :keywords: rocThrust, ROCm, API, reference, data type, support 4 | 5 | .. _license: 6 | 7 | ****************************************** 8 | License 9 | ****************************************** 10 | 11 | .. include:: ../LICENSE 12 | :literal: 13 | -------------------------------------------------------------------------------- /docs/sphinx/_toc.yml.in: -------------------------------------------------------------------------------- 1 | # Anywhere {branch} is used, the branch name will be substituted. 2 | # These comments will also be removed. 3 | defaults: 4 | numbered: False 5 | root: index 6 | subtrees: 7 | - caption: Installation 8 | entries: 9 | - file: install/rocThrust-prerequisites 10 | title: Installation prerequisites 11 | - file: install/rocThrust-install-overview 12 | title: Installation overview 13 | - file: install/rocThrust-install-script 14 | title: Installing on Linux 15 | - file: install/rocThrust-rmake-install 16 | title: Installing on Windows 17 | - file: install/rocThrust-install-with-cmake 18 | title: Installing on Linux and Windows with CMake 19 | 20 | 21 | - caption: How to 22 | entries: 23 | - file: how-to/use-rocThrust-in-a-project.rst 24 | title: Add rocThrust to a CMake project 25 | - file: how-to/run-rocThrust-tests-on-multiple-gpus 26 | title: Run tests on multiple GPUs 27 | 28 | - caption: API reference 29 | entries: 30 | - file: reference/rocThrust-hipstdpar 31 | - file: data-type-support 32 | - file: bitwise-repro 33 | - file: hipgraph-support 34 | - file: hip-execution-policies 35 | - file: cpp_api 36 | - file: genindex 37 | 38 | - caption: About 39 | entries: 40 | - file: license 41 | -------------------------------------------------------------------------------- /docs/sphinx/requirements.in: -------------------------------------------------------------------------------- 1 | rocm-docs-core==1.18.2 2 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | Once Thrust has been installed, these example programs can be compiled 2 | directly with nvcc. For example, the following command will compile the 3 | norm example. 4 | $ nvcc norm.cu -o norm 5 | 6 | These examples are also available online: 7 | https://github.com/NVIDIA/thrust/tree/main/examples 8 | -------------------------------------------------------------------------------- /examples/cpp_integration/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ######################################################################## 2 | # Copyright 2020-2025 Advanced Micro Devices, Inc. 3 | # ######################################################################## 4 | 5 | 6 | # link host.cpp to device.cu 7 | 8 | set(EXAMPLE_SOURCE host.cpp device.cu device.h) 9 | set(EXAMPLE_TARGET example_thrust_linking) 10 | set_source_files_properties(device.cu 11 | PROPERTIES 12 | LANGUAGE CXX 13 | ) 14 | add_executable(${EXAMPLE_TARGET} ${EXAMPLE_SOURCE}) 15 | 16 | target_compile_options(${EXAMPLE_TARGET} PRIVATE ${COMPILE_OPTIONS}) 17 | target_link_libraries(${EXAMPLE_TARGET} 18 | PRIVATE 19 | rocthrust 20 | roc::rocprim_hip 21 | ) 22 | foreach(gpu_target ${GPU_TARGETS}) 23 | target_link_libraries(${EXAMPLE_TARGET} 24 | INTERFACE 25 | --cuda-gpu-arch=${gpu_target} 26 | ) 27 | endforeach() 28 | set_target_properties(${EXAMPLE_TARGET} 29 | PROPERTIES 30 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/examples/cpp_integration" 31 | ) 32 | -------------------------------------------------------------------------------- /examples/cpp_integration/README: -------------------------------------------------------------------------------- 1 | This example shows how to link a Thrust program contained in 2 | a .cu file with a C++ program contained in a .cpp file. Note 3 | that device_vector only appears in the .cu file while host_vector 4 | appears in both. This relects the fact that algorithms on device 5 | vectors are only available when the contents of the program are 6 | located in a .cu file and compiled with the nvcc compiler. 7 | 8 | On a Linux system where Thrust is installed in the default location 9 | we can use the following procedure to compile the two parts of the 10 | program and link them together. 11 | 12 | $ nvcc -O2 -c device.cu 13 | $ g++ -O2 -c host.cpp -I/usr/local/cuda/include/ 14 | $ nvcc -o tester device.o host.o 15 | 16 | Alternatively, we can use g++ to perform final linking step. 17 | 18 | $ nvcc -O2 -c device.cu 19 | $ g++ -O2 -c host.cpp -I/usr/local/cuda/include/ 20 | $ g++ -o tester device.o host.o -L/usr/local/cuda/lib64 -lcudart 21 | 22 | -------------------------------------------------------------------------------- /examples/cpp_integration/device.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All rights reserved. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | // function prototype 26 | void sort_on_device(thrust::host_vector& V); 27 | -------------------------------------------------------------------------------- /examples/cuda/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB example_srcs 2 | RELATIVE "${CMAKE_CURRENT_LIST_DIR}}" 3 | CONFIGURE_DEPENDS 4 | *.cu *.cpp 5 | ) 6 | 7 | foreach(thrust_target IN LISTS THRUST_TARGETS) 8 | thrust_get_target_property(config_device ${thrust_target} DEVICE) 9 | if (NOT config_device STREQUAL "CUDA") 10 | continue() 11 | endif() 12 | 13 | foreach(example_src IN LISTS example_srcs) 14 | get_filename_component(example_name "${example_src}" NAME_WLE) 15 | string(PREPEND example_name "cuda.") 16 | thrust_add_example(example_target ${example_name} "${example_src}" ${thrust_target}) 17 | endforeach() 18 | endforeach() 19 | -------------------------------------------------------------------------------- /examples/include/host_device.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2009 NVIDIA Corporation 3 | * Modifications Copyright© 2024 Advanced Micro Devices, Inc. All rights reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #pragma once 19 | 20 | #if THRUST_DEVICE_COMPILER != THRUST_DEVICE_COMPILER_NVCC 21 | 22 | # ifndef __host__ 23 | # define __host__ 24 | # endif 25 | 26 | # ifndef __device__ 27 | # define __device__ 28 | # endif 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /internal/test/thrust.example.cuda.explicit_cuda_stream.filecheck: -------------------------------------------------------------------------------- 1 | CHECK: sum is 499500 2 | -------------------------------------------------------------------------------- /test/test_seed.in.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * Modifications Copyright© 2020-2025 Advanced Micro Devices, Inc. All rights reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #ifndef TEST_SEED_HPP_ 19 | #define TEST_SEED_HPP_ 20 | 21 | #include 22 | #include 23 | 24 | using random_engine = std::minstd_rand; 25 | using seed_type = random_engine::result_type; 26 | 27 | static constexpr size_t rng_seed_count = ${RNG_SEED_COUNT}; 28 | static const std::initializer_list prng_seeds = {${PRNG_SEEDS_INITIALIZER}}; 29 | static constexpr seed_type seed_value_addition = 100; 30 | 31 | #endif // TEST_SEED_HPP_ 32 | -------------------------------------------------------------------------------- /testing/async/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(exclusive_scan) 2 | add_subdirectory(inclusive_scan) 3 | -------------------------------------------------------------------------------- /testing/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB test_srcs 2 | RELATIVE "${CMAKE_CURRENT_LIST_DIR}}" 3 | CONFIGURE_DEPENDS 4 | *.cu *.cpp 5 | ) 6 | 7 | foreach(thrust_target IN LISTS THRUST_TARGETS) 8 | thrust_get_target_property(config_device ${thrust_target} DEVICE) 9 | if (NOT config_device STREQUAL "CPP") 10 | continue() 11 | endif() 12 | 13 | foreach(test_src IN LISTS test_srcs) 14 | get_filename_component(test_name "${test_src}" NAME_WLE) 15 | string(PREPEND test_name "cpp.") 16 | thrust_add_test(test_target ${test_name} "${test_src}" ${thrust_target}) 17 | endforeach() 18 | endforeach() 19 | -------------------------------------------------------------------------------- /testing/cuda/cudart.cu: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * Modifications Copyright© 2019-2025 Advanced Micro Devices, Inc. All rights reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #include 19 | 20 | #include 21 | 22 | #include 23 | 24 | template 25 | void TestCudaMallocResultAligned(const std::size_t n) 26 | { 27 | T* ptr = 0; 28 | cudaMalloc(&ptr, n * sizeof(T)); 29 | cudaFree(ptr); 30 | 31 | ASSERT_EQUAL(true, thrust::detail::util::is_aligned(ptr)); 32 | } 33 | DECLARE_VARIABLE_UNITTEST(TestCudaMallocResultAligned); 34 | -------------------------------------------------------------------------------- /testing/cuda/stream_legacy.cu: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * Modifications Copyright© 2019-2025 Advanced Micro Devices, Inc. All rights reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #include 19 | #include 20 | 21 | #include 22 | 23 | #include 24 | 25 | void verify_stream() 26 | { 27 | auto exec = thrust::device; 28 | auto stream = thrust::cuda_cub::stream(exec); 29 | ASSERT_EQUAL(stream, cudaStreamLegacy); 30 | } 31 | 32 | void TestLegacyDefaultStream() 33 | { 34 | verify_stream(); 35 | 36 | std::thread t(verify_stream); 37 | t.join(); 38 | } 39 | DECLARE_UNITTEST(TestLegacyDefaultStream); 40 | -------------------------------------------------------------------------------- /testing/cuda/stream_per_thread.cmake: -------------------------------------------------------------------------------- 1 | # This test should always use per-thread streams on NVCC. 2 | set_target_properties(${test_target} PROPERTIES 3 | COMPILE_OPTIONS 4 | $<$,$>:--default-stream=per-thread> 5 | ) 6 | 7 | # NVC++ does not have an equivalent option, and will always 8 | # use the global stream by default. 9 | if (CMAKE_CUDA_COMPILER_ID STREQUAL "Feta") 10 | set_tests_properties(${test_target} PROPERTIES WILL_FAIL ON) 11 | endif() 12 | -------------------------------------------------------------------------------- /testing/cuda/stream_per_thread.cu: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * Modifications Copyright© 2019-2025 Advanced Micro Devices, Inc. All rights reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #include 19 | #include 20 | 21 | #include 22 | 23 | #include 24 | 25 | void verify_stream() 26 | { 27 | auto exec = thrust::device; 28 | auto stream = thrust::cuda_cub::stream(exec); 29 | ASSERT_EQUAL(stream, cudaStreamPerThread); 30 | } 31 | 32 | void TestPerThreadDefaultStream() 33 | { 34 | verify_stream(); 35 | 36 | std::thread t(verify_stream); 37 | t.join(); 38 | } 39 | DECLARE_UNITTEST(TestPerThreadDefaultStream); 40 | -------------------------------------------------------------------------------- /testing/omp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB test_srcs 2 | RELATIVE "${CMAKE_CURRENT_LIST_DIR}}" 3 | CONFIGURE_DEPENDS 4 | *.cu *.cpp 5 | ) 6 | 7 | foreach(thrust_target IN LISTS THRUST_TARGETS) 8 | thrust_get_target_property(config_device ${thrust_target} DEVICE) 9 | if (NOT config_device STREQUAL "OMP") 10 | continue() 11 | endif() 12 | 13 | foreach(test_src IN LISTS test_srcs) 14 | get_filename_component(test_name "${test_src}" NAME_WLE) 15 | string(PREPEND test_name "omp.") 16 | thrust_add_test(test_target ${test_name} "${test_src}" ${thrust_target}) 17 | endforeach() 18 | endforeach() 19 | -------------------------------------------------------------------------------- /testing/unittest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | foreach(thrust_target IN LISTS THRUST_TARGETS) 2 | thrust_get_target_property(config_device ${thrust_target} DEVICE) 3 | thrust_get_target_property(config_prefix ${thrust_target} PREFIX) 4 | 5 | set(framework_target ${config_prefix}.test.framework) 6 | 7 | if ("CUDA" STREQUAL "${config_device}") 8 | set(framework_srcs 9 | testframework.cu 10 | cuda/testframework.cu 11 | ) 12 | else() 13 | # Wrap the cu file inside a .cpp file for non-CUDA builds 14 | thrust_wrap_cu_in_cpp(framework_srcs testframework.cu ${thrust_target}) 15 | endif() 16 | 17 | add_library(${framework_target} STATIC ${framework_srcs}) 18 | target_link_libraries(${framework_target} PUBLIC ${thrust_target}) 19 | target_include_directories(${framework_target} PRIVATE $) 20 | thrust_clone_target_properties(${framework_target} ${thrust_target}) 21 | endforeach() 22 | -------------------------------------------------------------------------------- /thrust/addressof.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018 NVIDIA Corporation 2 | // Author: Bryce Adelstein Lelbach 3 | // 4 | // Distributed under the Boost Software License v1.0 (boost.org/LICENSE_1_0.txt) 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | #include 11 | 12 | THRUST_NAMESPACE_BEGIN 13 | 14 | /////////////////////////////////////////////////////////////////////////////// 15 | 16 | /*! Obtains the actual address of the object or function arg, even in presence of overloaded operator&. 17 | */ 18 | template 19 | THRUST_HOST_DEVICE T* addressof(T& arg) 20 | { 21 | return reinterpret_cast(&const_cast(reinterpret_cast(arg))); 22 | } 23 | 24 | /////////////////////////////////////////////////////////////////////////////// 25 | 26 | THRUST_NAMESPACE_END 27 | -------------------------------------------------------------------------------- /thrust/cmake/thrust-config-version.cmake: -------------------------------------------------------------------------------- 1 | # Parse version information from version.h: 2 | include("${CMAKE_CURRENT_LIST_DIR}/thrust-header-search.cmake") 3 | 4 | set(THRUST_VERSION_MAJOR 2) 5 | set(THRUST_VERSION_MINOR 6) 6 | set(THRUST_VERSION_PATCH 0) # Thrust: "subminor" CMake: "patch" 7 | set(THRUST_VERSION_TWEAK 0) 8 | set(THRUST_VERSION "${THRUST_VERSION_MAJOR}.${THRUST_VERSION_MINOR}.${THRUST_VERSION_PATCH}.${THRUST_VERSION_TWEAK}") 9 | 10 | set(PACKAGE_VERSION ${THRUST_VERSION}) 11 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 12 | set(PACKAGE_VERSION_EXACT FALSE) 13 | set(PACKAGE_VERSION_UNSUITABLE FALSE) 14 | 15 | if(PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION) 16 | if(THRUST_VERSION_MAJOR VERSION_EQUAL PACKAGE_FIND_VERSION_MAJOR AND 17 | THRUST_VERSION_MINOR VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MINOR) 18 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 19 | endif() 20 | 21 | if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) 22 | set(PACKAGE_VERSION_EXACT TRUE) 23 | endif() 24 | endif() 25 | -------------------------------------------------------------------------------- /thrust/cmake/thrust-header-search.cmake: -------------------------------------------------------------------------------- 1 | # Parse version information from version.h in source tree 2 | set(_THRUST_VERSION_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/../..") 3 | if(EXISTS "${_THRUST_VERSION_INCLUDE_DIR}/thrust/version.h") 4 | set(_THRUST_VERSION_INCLUDE_DIR "${_THRUST_VERSION_INCLUDE_DIR}" CACHE FILEPATH "" FORCE) # Clear old result 5 | set_property(CACHE _THRUST_VERSION_INCLUDE_DIR PROPERTY TYPE INTERNAL) 6 | endif() 7 | -------------------------------------------------------------------------------- /thrust/cmake/thrust-header-search.cmake.in: -------------------------------------------------------------------------------- 1 | # Parse version information from version.h: 2 | unset(_THRUST_VERSION_INCLUDE_DIR CACHE) # Clear old result to force search 3 | 4 | # Find CMAKE_INSTALL_INCLUDEDIR=@CMAKE_INSTALL_INCLUDEDIR@ directory" 5 | set(from_install_prefix "@install_location@") 6 | 7 | # Transform to a list of directories, replace each directoy with "../" 8 | # and convert back to a string 9 | string(REGEX REPLACE "/" ";" from_install_prefix "${from_install_prefix}") 10 | list(TRANSFORM from_install_prefix REPLACE ".+" "../") 11 | list(JOIN from_install_prefix "" from_install_prefix) 12 | 13 | find_path(_THRUST_VERSION_INCLUDE_DIR thrust/version.h 14 | NO_CMAKE_FIND_ROOT_PATH # Don't allow CMake to re-root the search 15 | NO_DEFAULT_PATH # Only search explicit paths below: 16 | PATHS 17 | "${CMAKE_CURRENT_LIST_DIR}/${from_install_prefix}/@CMAKE_INSTALL_INCLUDEDIR@" 18 | ) 19 | set_property(CACHE _THRUST_VERSION_INCLUDE_DIR PROPERTY TYPE INTERNAL) 20 | -------------------------------------------------------------------------------- /thrust/detail/algorithm_wrapper.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | // When a compiler uses Thrust as part of its implementation of Standard C++ 20 | // algorithms, a cycle of included files may result when Thrust code tries to 21 | // use a standard algorithm. Having a macro that is defined only when Thrust 22 | // is including an algorithms-related header gives the compiler a chance to 23 | // detect and break the cycle of includes. 24 | 25 | #define THRUST_INCLUDING_ALGORITHMS_HEADER 26 | #include 27 | #undef THRUST_INCLUDING_ALGORITHMS_HEADER 28 | -------------------------------------------------------------------------------- /thrust/detail/allocator/default_construct_range.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | THRUST_NAMESPACE_BEGIN 22 | namespace detail 23 | { 24 | 25 | template 26 | THRUST_HOST_DEVICE inline void default_construct_range(Allocator& a, Pointer p, Size n); 27 | 28 | } // namespace detail 29 | THRUST_NAMESPACE_END 30 | 31 | #include 32 | -------------------------------------------------------------------------------- /thrust/detail/allocator/destroy_range.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | THRUST_NAMESPACE_BEGIN 22 | namespace detail 23 | { 24 | 25 | template 26 | THRUST_HOST_DEVICE inline void destroy_range(Allocator& a, Pointer p, Size n); 27 | 28 | } // namespace detail 29 | THRUST_NAMESPACE_END 30 | 31 | #include 32 | -------------------------------------------------------------------------------- /thrust/detail/allocator/fill_construct_range.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | THRUST_NAMESPACE_BEGIN 22 | namespace detail 23 | { 24 | 25 | template 26 | THRUST_HOST_DEVICE inline void fill_construct_range(Allocator& a, Pointer p, Size n, const T& value); 27 | 28 | } // namespace detail 29 | THRUST_NAMESPACE_END 30 | 31 | #include 32 | -------------------------------------------------------------------------------- /thrust/detail/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /*! \file config.h 17 | * \brief Defines platform configuration. 18 | */ 19 | 20 | #pragma once 21 | 22 | #include 23 | #include 24 | -------------------------------------------------------------------------------- /thrust/detail/config/forceinline.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * Modifications Copyright© 2019-2025 Advanced Micro Devices, Inc. All rights reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /*! \file forceinline.h 19 | * \brief Defines __thrust_forceinline__ 20 | */ 21 | 22 | #pragma once 23 | 24 | // Internal config header that is only included through thrust/detail/config/config.h 25 | 26 | #if defined(__CUDACC__) || defined(_NVHPC_CUDA) 27 | 28 | # define __thrust_forceinline__ __forceinline__ 29 | 30 | #elif THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_HIP 31 | 32 | # define __thrust_forceinline__ __forceinline__ 33 | 34 | #else 35 | 36 | // TODO add 37 | 38 | # define __thrust_forceinline__ 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /thrust/detail/config/global_workarounds.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // XXX workaround gcc 4.8+'s complaints about unused local aliases by silencing them globally 22 | #if defined(THRUST_GCC_VERSION) && (THRUST_GCC_VERSION >= 40800) 23 | # if defined(__NVCC__) && (CUDART_VERSION >= 6000) 24 | # pragma GCC diagnostic ignored "-Wunused-local-typedefs" 25 | # endif // nvcc & cuda 6+ 26 | #endif // gcc 4.8 27 | -------------------------------------------------------------------------------- /thrust/detail/config/memory_resource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | #include 25 | 26 | #define THRUST_MR_DEFAULT_ALIGNMENT alignof(THRUST_NS_QUALIFIER::detail::max_align_t) 27 | 28 | #if THRUST_CPP_DIALECT >= 2017 29 | # if __has_include() 30 | # define THRUST_MR_STD_MR_HEADER 31 | # define THRUST_MR_STD_MR_NS std::pmr 32 | # elif __has_include() 33 | # define THRUST_MR_STD_MR_HEADER 34 | # define THRUST_MR_STD_MR_NS std::experimental::pmr 35 | # endif 36 | #endif 37 | -------------------------------------------------------------------------------- /thrust/detail/config/simple_defines.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*! \file simple_defines.h 18 | * \brief Primitive macros without dependencies. 19 | */ 20 | 21 | #pragma once 22 | 23 | #define THRUST_UNKNOWN 0 24 | #define THRUST_FALSE 0 25 | #define THRUST_TRUE 1 26 | 27 | #define THRUST_UNUSED_VAR(expr) \ 28 | do \ 29 | { \ 30 | (void) (expr); \ 31 | } while (0) 32 | 33 | #define THRUST_PREVENT_MACRO_SUBSTITUTION 34 | -------------------------------------------------------------------------------- /thrust/detail/cpp_version_check.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // This should be removed after cpp14 is fully deprecated. 22 | #ifdef THRUST_CPP14_REQUIRED_NO_ERROR 23 | # define THRUST_CPP_VERSTION_CHECK_NO_ERROR 24 | #endif 25 | 26 | #ifndef THRUST_CPP_VERSTION_CHECK_NO_ERROR 27 | # if THRUST_CPP_DIALECT < 2017 28 | # error C++17 is required for this Thrust feature; please upgrade your compiler or pass the appropriate -std=c++17 flag to it. 29 | # endif 30 | #endif 31 | -------------------------------------------------------------------------------- /thrust/detail/device_delete.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | THRUST_NAMESPACE_BEGIN 25 | 26 | namespace detail 27 | { 28 | 29 | // define an empty allocator class to use below 30 | struct device_delete_allocator {}; 31 | 32 | } 33 | 34 | template 35 | void device_delete(device_ptr ptr, 36 | const size_t n) 37 | { 38 | // we can use device_allocator to destroy the range 39 | thrust::detail::device_delete_allocator a; 40 | thrust::detail::destroy_range(a, ptr, n); 41 | thrust::device_free(ptr); 42 | } // end device_delete() 43 | 44 | THRUST_NAMESPACE_END 45 | -------------------------------------------------------------------------------- /thrust/detail/device_free.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | THRUST_NAMESPACE_BEGIN 26 | 27 | void device_free(thrust::device_ptr ptr) 28 | { 29 | using thrust::system::detail::generic::select_system; 30 | 31 | using system = thrust::iterator_system>::type; 32 | 33 | // XXX lower to select_system(system) here 34 | system s; 35 | 36 | thrust::free(s, ptr); 37 | } // end device_free() 38 | 39 | THRUST_NAMESPACE_END 40 | -------------------------------------------------------------------------------- /thrust/detail/distance.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | THRUST_NAMESPACE_BEGIN 25 | 26 | THRUST_EXEC_CHECK_DISABLE 27 | template 28 | inline THRUST_HOST_DEVICE 29 | typename thrust::iterator_traits::difference_type 30 | distance(InputIterator first, InputIterator last) 31 | { 32 | return thrust::system::detail::generic::distance(first, last); 33 | } // end distance() 34 | 35 | THRUST_NAMESPACE_END 36 | -------------------------------------------------------------------------------- /thrust/detail/functional/operators.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | -------------------------------------------------------------------------------- /thrust/detail/functional/placeholder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | THRUST_NAMESPACE_BEGIN 25 | namespace detail 26 | { 27 | namespace functional 28 | { 29 | 30 | template 31 | struct placeholder 32 | { 33 | using type = actor>; 34 | }; 35 | 36 | } // namespace functional 37 | } // namespace detail 38 | THRUST_NAMESPACE_END 39 | -------------------------------------------------------------------------------- /thrust/detail/memory_wrapper.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | // When a compiler uses Thrust as part of its implementation of Standard C++ 20 | // algorithms, a cycle of included files may result when Thrust code tries to 21 | // use a standard algorithm. Having a macro that is defined only when Thrust 22 | // is including an algorithms-related header gives the compiler a chance to 23 | // detect and break the cycle of includes. ( declares several standard 24 | // algorithms, including all of the uninitialized_* algorithms. "_ALGORITHMS_" 25 | // in the macro name is meant generically, not as a specific reference to 26 | // the header .) 27 | 28 | #define THRUST_INCLUDING_ALGORITHMS_HEADER 29 | #include 30 | #undef THRUST_INCLUDING_ALGORITHMS_HEADER 31 | -------------------------------------------------------------------------------- /thrust/detail/modern_gcc_required.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #ifndef THRUST_MODERN_GCC_REQUIRED_NO_ERROR 22 | # if defined(THRUST_GCC_VERSION) && !defined(THRUST_MODERN_GCC) 23 | # error GCC 5 or later is required for this Thrust feature; please upgrade your compiler. 24 | # endif 25 | #endif 26 | -------------------------------------------------------------------------------- /thrust/detail/numeric_wrapper.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | // When a compiler uses Thrust as part of its implementation of Standard C++ 20 | // algorithms, a cycle of included files may result when Thrust code tries to 21 | // use a standard algorithm. Having a macro that is defined only when Thrust 22 | // is including an algorithms-related header gives the compiler a chance to 23 | // detect and break the cycle of includes. 24 | 25 | #define THRUST_INCLUDING_ALGORITHMS_HEADER 26 | #include 27 | #undef THRUST_INCLUDING_ALGORITHMS_HEADER 28 | -------------------------------------------------------------------------------- /thrust/detail/reference_forward_declaration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2020 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | 23 | THRUST_NAMESPACE_BEGIN 24 | 25 | template 26 | class reference; 27 | 28 | THRUST_NAMESPACE_END 29 | -------------------------------------------------------------------------------- /thrust/detail/swap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | THRUST_NAMESPACE_BEGIN 22 | 23 | THRUST_EXEC_CHECK_DISABLE 24 | template 25 | THRUST_HOST_DEVICE inline void swap(Assignable1& a, Assignable2& b) 26 | { 27 | Assignable1 temp = a; 28 | a = b; 29 | b = temp; 30 | } // end swap() 31 | 32 | THRUST_NAMESPACE_END 33 | -------------------------------------------------------------------------------- /thrust/detail/swap.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | -------------------------------------------------------------------------------- /thrust/detail/type_traits/is_metafunction_defined.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | THRUST_NAMESPACE_BEGIN 25 | 26 | namespace detail 27 | { 28 | 29 | __THRUST_DEFINE_HAS_NESTED_TYPE(is_metafunction_defined, type) 30 | 31 | template 32 | struct enable_if_defined : thrust::detail::lazy_enable_if::value, Metafunction> 33 | {}; 34 | 35 | } // namespace detail 36 | 37 | THRUST_NAMESPACE_END 38 | -------------------------------------------------------------------------------- /thrust/detail/type_traits/iterator/is_discard_iterator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | THRUST_NAMESPACE_BEGIN 25 | namespace detail 26 | { 27 | 28 | template 29 | struct is_discard_iterator : public thrust::detail::false_type 30 | {}; 31 | 32 | template 33 | struct is_discard_iterator> : public thrust::detail::true_type 34 | {}; 35 | 36 | } // end namespace detail 37 | THRUST_NAMESPACE_END 38 | -------------------------------------------------------------------------------- /thrust/detail/use_default.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | THRUST_NAMESPACE_BEGIN 22 | 23 | struct use_default 24 | {}; 25 | 26 | THRUST_NAMESPACE_END 27 | -------------------------------------------------------------------------------- /thrust/event.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*! \file thrust/event.h 18 | * \brief `thrust::event`, an asynchronous handle type. 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | // TODO: Actually separate `` into two headers. 26 | -------------------------------------------------------------------------------- /thrust/iterator/detail/any_assign.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | THRUST_NAMESPACE_BEGIN 22 | namespace detail 23 | { 24 | 25 | // a type which may be assigned any other type 26 | struct any_assign 27 | { 28 | inline THRUST_HOST_DEVICE any_assign() {} 29 | 30 | template 31 | inline THRUST_HOST_DEVICE any_assign(T) 32 | {} 33 | 34 | template 35 | inline THRUST_HOST_DEVICE any_assign& operator=(T) 36 | { 37 | if (0) 38 | { 39 | // trick the compiler into silencing "warning: this expression has no effect" 40 | int* x = 0; 41 | *x = 13; 42 | } // end if 43 | 44 | return *this; 45 | } 46 | }; 47 | 48 | } // namespace detail 49 | THRUST_NAMESPACE_END 50 | -------------------------------------------------------------------------------- /thrust/iterator/detail/any_system_tag.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | 23 | THRUST_NAMESPACE_BEGIN 24 | 25 | struct any_system_tag : thrust::execution_policy 26 | { 27 | // allow any_system_tag to convert to any type at all 28 | // XXX make this safer using enable_if> upon c++11 29 | template 30 | operator T() const 31 | { 32 | return T(); 33 | } 34 | }; 35 | 36 | THRUST_NAMESPACE_END 37 | -------------------------------------------------------------------------------- /thrust/iterator/detail/device_system_tag.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // #include the device system's execution_policy header 22 | #define __THRUST_DEVICE_SYSTEM_TAG_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/execution_policy.h> 23 | #include __THRUST_DEVICE_SYSTEM_TAG_HEADER 24 | #undef __THRUST_DEVICE_SYSTEM_TAG_HEADER 25 | 26 | THRUST_NAMESPACE_BEGIN 27 | 28 | using device_system_tag = thrust::system::__THRUST_DEVICE_SYSTEM_NAMESPACE::tag; 29 | 30 | THRUST_NAMESPACE_END 31 | -------------------------------------------------------------------------------- /thrust/iterator/detail/distance_from_result.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | 23 | THRUST_NAMESPACE_BEGIN 24 | 25 | namespace detail 26 | { 27 | 28 | // since both arguments are known to be specializations of iterator_facade, 29 | // it's legal to access IteratorFacade2::difference_type 30 | template 31 | struct distance_from_result 32 | : eval_if::value, 33 | identity_, 34 | identity_> 35 | {}; 36 | 37 | } // namespace detail 38 | 39 | THRUST_NAMESPACE_END 40 | -------------------------------------------------------------------------------- /thrust/iterator/detail/host_system_tag.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // #include the host system's execution_policy header 22 | #define __THRUST_HOST_SYSTEM_TAG_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/execution_policy.h> 23 | #include __THRUST_HOST_SYSTEM_TAG_HEADER 24 | #undef __THRUST_HOST_SYSTEM_TAG_HEADER 25 | 26 | THRUST_NAMESPACE_BEGIN 27 | 28 | using host_system_tag = thrust::system::__THRUST_HOST_SYSTEM_NAMESPACE::tag; 29 | 30 | THRUST_NAMESPACE_END 31 | -------------------------------------------------------------------------------- /thrust/iterator/detail/iterator_traversal_tags.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | THRUST_NAMESPACE_BEGIN 22 | 23 | // define Boost's traversal tags 24 | struct no_traversal_tag 25 | {}; 26 | 27 | struct incrementable_traversal_tag : no_traversal_tag 28 | {}; 29 | 30 | struct single_pass_traversal_tag : incrementable_traversal_tag 31 | {}; 32 | 33 | struct forward_traversal_tag : single_pass_traversal_tag 34 | {}; 35 | 36 | struct bidirectional_traversal_tag : forward_traversal_tag 37 | {}; 38 | 39 | struct random_access_traversal_tag : bidirectional_traversal_tag 40 | {}; 41 | 42 | THRUST_NAMESPACE_END 43 | -------------------------------------------------------------------------------- /thrust/iterator/detail/reverse_iterator_base.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | THRUST_NAMESPACE_BEGIN 25 | 26 | template 27 | class reverse_iterator; 28 | 29 | namespace detail 30 | { 31 | 32 | template 33 | struct reverse_iterator_base 34 | { 35 | using type = thrust::iterator_adaptor, BidirectionalIterator>; 36 | }; // end reverse_iterator_base 37 | 38 | } // namespace detail 39 | 40 | THRUST_NAMESPACE_END 41 | -------------------------------------------------------------------------------- /thrust/limits.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018 NVIDIA Corporation 2 | // Author: Bryce Adelstein Lelbach 3 | // 4 | // Distributed under the Boost Software License v1.0 (boost.org/LICENSE_1_0.txt) 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | #include 11 | 12 | #include 13 | 14 | THRUST_NAMESPACE_BEGIN 15 | 16 | template 17 | struct numeric_limits : std::numeric_limits 18 | {}; 19 | 20 | THRUST_NAMESPACE_END 21 | -------------------------------------------------------------------------------- /thrust/mr/host_memory_resource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-2020 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // #include the host system's memory_resource header 22 | #define __THRUST_HOST_SYSTEM_MEMORY_HEADER <__THRUST_HOST_SYSTEM_ROOT/memory_resource.h> 23 | #include __THRUST_HOST_SYSTEM_MEMORY_HEADER 24 | #undef __THRUST_HOST_SYSTEM_MEMORY_HEADER 25 | 26 | THRUST_NAMESPACE_BEGIN 27 | 28 | using host_memory_resource = thrust::system::__THRUST_HOST_SYSTEM_NAMESPACE::memory_resource; 29 | 30 | THRUST_NAMESPACE_END 31 | -------------------------------------------------------------------------------- /thrust/mr/universal_memory_resource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-2020 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | -------------------------------------------------------------------------------- /thrust/mr/validator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | THRUST_NAMESPACE_BEGIN 25 | namespace mr 26 | { 27 | 28 | template 29 | struct validator 30 | { 31 | static_assert(std::is_base_of, MR>::value, 32 | "a type used as a memory resource must derive from memory_resource"); 33 | }; 34 | 35 | template 36 | struct validator2 37 | : private validator 38 | , private validator 39 | {}; 40 | 41 | template 42 | struct validator2 : private validator 43 | {}; 44 | 45 | } // namespace mr 46 | THRUST_NAMESPACE_END 47 | -------------------------------------------------------------------------------- /thrust/random/detail/linear_feedback_shift_engine_wordmask.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | THRUST_NAMESPACE_BEGIN 22 | 23 | namespace random 24 | { 25 | 26 | namespace detail 27 | { 28 | 29 | template 30 | struct linear_feedback_shift_engine_wordmask 31 | { 32 | static const T value = (T(1u) << i) | linear_feedback_shift_engine_wordmask::value; 33 | }; // end linear_feedback_shift_engine_wordmask 34 | 35 | template 36 | struct linear_feedback_shift_engine_wordmask 37 | { 38 | static const T value = 0; 39 | }; // end linear_feedback_shift_engine_wordmask 40 | 41 | } // namespace detail 42 | 43 | } // namespace random 44 | 45 | THRUST_NAMESPACE_END 46 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/adjacent_difference.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits adjacent_difference 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/assign_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits assign_value 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/binary_search.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits the binary search algorithms 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/copy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits copy 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/copy_if.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits copy_if 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/count.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/equal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/extrema.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits extrema algorithms 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/fill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/find.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits find 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/for_each.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits for_each 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/gather.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/generate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/get_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits get_value 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/inner_product.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/iter_swap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits iter_swap 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/logical.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/malloc_and_free.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits malloc & free 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/merge.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits merge 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/mismatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/partition.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits partition 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/per_device_resource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special per device resource functions 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/reduce.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits reduce 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/reduce_by_key.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits reduce_by_key 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/remove.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits remove 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/replace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/reverse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/scan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits scan 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/scan_by_key.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits the scan_by_key algorithms 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/scatter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/sequence.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/set_operations.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits the set operations 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/sort.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits sort 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/swap_ranges.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // cpp has no special swap_ranges 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/tabulate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/temporary_buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special temporary buffer functions 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/transform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // cpp has no special transform 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/transform_reduce.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/transform_scan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/uninitialized_copy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/uninitialized_fill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/unique.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits unique 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cpp/detail/unique_by_key.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits unique_by_key 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/cuda/detail/binary_search.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | // this system has no special version of this algorithm 20 | -------------------------------------------------------------------------------- /thrust/system/cuda/detail/logical.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cuda/detail/sequence.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/cuda/detail/temporary_buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2016 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special temporary buffer functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/generic/advance.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | THRUST_NAMESPACE_BEGIN 22 | namespace system 23 | { 24 | namespace detail 25 | { 26 | namespace generic 27 | { 28 | 29 | template 30 | THRUST_HOST_DEVICE void advance(InputIterator& i, Distance n); 31 | 32 | } // end namespace generic 33 | } // end namespace detail 34 | } // end namespace system 35 | THRUST_NAMESPACE_END 36 | 37 | #include 38 | -------------------------------------------------------------------------------- /thrust/system/detail/generic/distance.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | 23 | THRUST_NAMESPACE_BEGIN 24 | namespace system 25 | { 26 | namespace detail 27 | { 28 | namespace generic 29 | { 30 | 31 | template 32 | inline THRUST_HOST_DEVICE typename thrust::iterator_traits::difference_type 33 | distance(InputIterator first, InputIterator last); 34 | 35 | } // end namespace generic 36 | } // end namespace detail 37 | } // end namespace system 38 | THRUST_NAMESPACE_END 39 | 40 | #include 41 | -------------------------------------------------------------------------------- /thrust/system/detail/generic/per_device_resource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | THRUST_NAMESPACE_BEGIN 26 | namespace system 27 | { 28 | namespace detail 29 | { 30 | namespace generic 31 | { 32 | 33 | template 34 | THRUST_HOST MR* get_per_device_resource(thrust::detail::execution_policy_base&) 35 | { 36 | return mr::get_global_resource(); 37 | } 38 | 39 | } // namespace generic 40 | } // namespace detail 41 | } // namespace system 42 | THRUST_NAMESPACE_END 43 | -------------------------------------------------------------------------------- /thrust/system/detail/generic/swap_ranges.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | 23 | THRUST_NAMESPACE_BEGIN 24 | namespace system 25 | { 26 | namespace detail 27 | { 28 | namespace generic 29 | { 30 | 31 | template 32 | THRUST_HOST_DEVICE ForwardIterator2 swap_ranges( 33 | thrust::execution_policy& exec, 34 | ForwardIterator1 first1, 35 | ForwardIterator1 last1, 36 | ForwardIterator2 first2); 37 | 38 | } // end namespace generic 39 | } // end namespace detail 40 | } // end namespace system 41 | THRUST_NAMESPACE_END 42 | 43 | #include 44 | -------------------------------------------------------------------------------- /thrust/system/detail/generic/tabulate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | 23 | THRUST_NAMESPACE_BEGIN 24 | namespace system 25 | { 26 | namespace detail 27 | { 28 | namespace generic 29 | { 30 | 31 | template 32 | THRUST_HOST_DEVICE void tabulate( 33 | thrust::execution_policy& exec, ForwardIterator first, ForwardIterator last, UnaryOperation unary_op); 34 | 35 | } // end namespace generic 36 | } // end namespace detail 37 | } // end namespace system 38 | THRUST_NAMESPACE_END 39 | 40 | #include 41 | -------------------------------------------------------------------------------- /thrust/system/detail/generic/tag.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*! \file generic/tag.h 18 | * \brief Implementation of the generic backend's tag. 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | THRUST_NAMESPACE_BEGIN 26 | namespace system 27 | { 28 | namespace detail 29 | { 30 | namespace generic 31 | { 32 | 33 | // tag exists only to make the generic entry points the least priority match 34 | // during ADL. tag should not be derived from and is constructible from anything 35 | struct tag 36 | { 37 | template 38 | THRUST_HOST_DEVICE inline tag(const T&) 39 | {} 40 | }; 41 | 42 | } // namespace generic 43 | } // namespace detail 44 | } // namespace system 45 | THRUST_NAMESPACE_END 46 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/assign_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | THRUST_NAMESPACE_BEGIN 25 | namespace system 26 | { 27 | namespace detail 28 | { 29 | namespace sequential 30 | { 31 | 32 | template 33 | THRUST_HOST_DEVICE void assign_value(sequential::execution_policy&, Pointer1 dst, Pointer2 src) 34 | { 35 | *thrust::raw_pointer_cast(dst) = *thrust::raw_pointer_cast(src); 36 | } // end assign_value() 37 | 38 | } // namespace sequential 39 | } // namespace detail 40 | } // namespace system 41 | THRUST_NAMESPACE_END 42 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/count.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special count functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/equal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special equal functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/fill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special fill functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/gather.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special gather functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/generate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special generate functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/get_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | THRUST_NAMESPACE_BEGIN 25 | namespace system 26 | { 27 | namespace detail 28 | { 29 | namespace sequential 30 | { 31 | 32 | template 33 | THRUST_HOST_DEVICE typename thrust::iterator_value::type 34 | get_value(sequential::execution_policy&, Pointer ptr) 35 | { 36 | return *thrust::raw_pointer_cast(ptr); 37 | } // end get_value() 38 | 39 | } // namespace sequential 40 | } // namespace detail 41 | } // namespace system 42 | THRUST_NAMESPACE_END 43 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/inner_product.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special inner_product functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/logical.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special logical functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/mismatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special mismatch functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/per_device_resource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special per device resource functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/replace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special replace functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/reverse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special reverse functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/scatter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special scatter functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/sequence.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special sequence functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/swap_ranges.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special swap_ranges functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/tabulate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special tabulate functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/temporary_buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special temporary buffer functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/transform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special transform functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/transform_reduce.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special transform_reduce functions 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/transform_scan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/uninitialized_copy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | -------------------------------------------------------------------------------- /thrust/system/detail/sequential/uninitialized_fill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special unintialized_fill functions 22 | -------------------------------------------------------------------------------- /thrust/system/hip/detail/logical.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * Modifications Copyright© 2019 Advanced Micro Devices, Inc. All rights reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #pragma once 19 | 20 | #include 21 | 22 | // this system has no special version of this algorithm 23 | -------------------------------------------------------------------------------- /thrust/system/hip/detail/nv/target.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of libcu++, the C++ Standard Library for your entire system, 4 | // under the Apache License v2.0 with LLVM Exceptions. 5 | // See https://llvm.org/LICENSE.txt for license information. 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 | // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. 8 | // SPDX-FileCopyrightText: Modifications Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. 9 | // 10 | //===----------------------------------------------------------------------===// 11 | 12 | // This header contains a preview of a portability system that enables 13 | // CUDA C++ development with NVC++, NVCC, and supported host compilers. 14 | // These interfaces are not guaranteed to be stable. 15 | 16 | #ifndef __NV_TARGET_H 17 | #define __NV_TARGET_H 18 | 19 | #include "detail/__target_macros.h" // IWYU pragma: export 20 | 21 | #endif // __NV_TARGET_H 22 | -------------------------------------------------------------------------------- /thrust/system/hip/detail/sequence.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * Modifications Copyright© 2019 Advanced Micro Devices, Inc. All rights reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #pragma once 19 | 20 | #include 21 | 22 | // this system has no special version of this algorithm 23 | -------------------------------------------------------------------------------- /thrust/system/hip/detail/temporary_buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2016 NVIDIA Corporation 3 | * Modifications Copyright© 2019 Advanced Micro Devices, Inc. All rights reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #pragma once 19 | 20 | #include 21 | 22 | // this system has no special temporary buffer functions 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/assign_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits assign_value 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/count.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits count 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/default_decomposition.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*! \file default_decomposition.h 18 | * \brief Return a decomposition that is appropriate for the OpenMP backend. 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #include 26 | 27 | THRUST_NAMESPACE_BEGIN 28 | namespace system 29 | { 30 | namespace omp 31 | { 32 | namespace detail 33 | { 34 | 35 | template 36 | thrust::system::detail::internal::uniform_decomposition default_decomposition(IndexType n); 37 | 38 | } // end namespace detail 39 | } // end namespace omp 40 | } // end namespace system 41 | THRUST_NAMESPACE_END 42 | 43 | #include 44 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/equal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits equal 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/fill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits fill 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/gather.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits gather 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/generate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits generate 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/get_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits get_value 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/inner_product.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits inner_product 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/iter_swap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits iter_swap 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/logical.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits logical 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/malloc_and_free.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits malloc and free 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/merge.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits merge 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/mismatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits mismatch 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/per_device_resource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special per device resource functions 22 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/replace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits this algorithm 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/reverse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits reverse 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/scan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits scan 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/scan_by_key.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits this algorithm 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/scatter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits this algorithm 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/sequence.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits sequence 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/set_operations.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits set_operations 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/swap_ranges.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // omp inherits swap_ranges 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/tabulate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits tabulate 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/temporary_buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special temporary buffer functions 22 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/transform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // omp inherits transform 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/transform_reduce.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits transform_reduce 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/transform_scan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits transform_scan 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/uninitialized_copy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits uninitialized_copy 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/omp/detail/uninitialized_fill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits uninitialized_fill 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/assign_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits assign_value 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/binary_search.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits binary_search 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/copy_if.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | 23 | THRUST_NAMESPACE_BEGIN 24 | namespace system 25 | { 26 | namespace tbb 27 | { 28 | namespace detail 29 | { 30 | 31 | template 32 | OutputIterator 33 | copy_if(tag, InputIterator1 first, InputIterator1 last, InputIterator2 stencil, OutputIterator result, Predicate pred); 34 | 35 | } // namespace detail 36 | } // namespace tbb 37 | } // namespace system 38 | THRUST_NAMESPACE_END 39 | 40 | #include 41 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/count.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits count 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/equal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits equal 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/fill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits fill 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/gather.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits gather 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/generate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits generate 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/get_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits get_value 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/inner_product.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits inner_product 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/iter_swap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits iter_swap 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/logical.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits logical 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/malloc_and_free.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits malloc and free 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/mismatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits mismatch 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/per_device_resource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special per device resource functions 22 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/replace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits this algorithm 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/reverse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits reverse 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/scan_by_key.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits scan_by_key 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/scatter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits this algorithm 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/sequence.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits sequence 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/set_operations.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits set_operations 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/swap_ranges.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // tbb inherits swap_ranges 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/tabulate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits tabulate 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/temporary_buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special temporary buffer functions 22 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/transform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // omp inherits transform 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/transform_reduce.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits transform_reduce 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/transform_scan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits transform_scan 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/uninitialized_copy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits uninitialized_copy 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/system/tbb/detail/uninitialized_fill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2013 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits uninitialized_fill 22 | #include 23 | -------------------------------------------------------------------------------- /thrust/universal_ptr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2020 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*! \file universal_ptr.h 18 | * \brief A pointer to a variable which resides memory accessible to both 19 | * hosts and devices. 20 | */ 21 | 22 | #pragma once 23 | 24 | #include 25 | -------------------------------------------------------------------------------- /toolchain-linux.cmake: -------------------------------------------------------------------------------- 1 | #set(CMAKE_MAKE_PROGRAM "nmake.exe") 2 | #set(CMAKE_GENERATOR "Ninja") 3 | # Ninja doesn't support platform 4 | #set(CMAKE_GENERATOR_PLATFORM x64) 5 | 6 | if (DEFINED ENV{ROCM_PATH}) 7 | set(rocm_bin "$ENV{ROCM_PATH}/bin") 8 | else() 9 | set(ROCM_PATH "/opt/rocm" CACHE PATH "Path to the ROCm installation.") 10 | set(rocm_bin "/opt/rocm/bin") 11 | endif() 12 | 13 | if (NOT DEFINED ENV{CXX}) 14 | set(CMAKE_CXX_COMPILER "${rocm_bin}/amdclang++" CACHE PATH "Path to the C++ compiler") 15 | set(CMAKE_CXX_FLAGS_INIT "-mllvm -amdgpu-early-inline-all=true -mllvm -amdgpu-function-calls=false") 16 | if (DEFINED ENV{HIPCC_COMPILE_FLAGS_APPEND}) 17 | set(CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT} $ENV{HIPCC_COMPILE_FLAGS_APPEND}") 18 | endif() 19 | else() 20 | set(CMAKE_CXX_COMPILER "$ENV{CXX}" CACHE PATH "Path to the C++ compiler") 21 | endif() 22 | -------------------------------------------------------------------------------- /toolchain-windows.cmake: -------------------------------------------------------------------------------- 1 | #set(CMAKE_MAKE_PROGRAM "nmake.exe") 2 | #set(CMAKE_GENERATOR "Ninja") 3 | # Ninja doesn't support platform 4 | #set(CMAKE_GENERATOR_PLATFORM x64) 5 | 6 | if (DEFINED ENV{HIP_PATH}) 7 | file(TO_CMAKE_PATH "$ENV{HIP_PATH}" HIP_DIR) 8 | set(rocm_bin "${HIP_DIR}/bin") 9 | elseif (DEFINED ENV{HIP_DIR}) 10 | file(TO_CMAKE_PATH "$ENV{HIP_DIR}" HIP_DIR) 11 | set(rocm_bin "${HIP_DIR}/bin") 12 | else() 13 | set(HIP_DIR "C:/hip") 14 | set(rocm_bin "C:/hip/bin") 15 | endif() 16 | 17 | set(CMAKE_CXX_COMPILER "${rocm_bin}/clang++.exe") 18 | 19 | if (NOT python) 20 | set(python "python3") # take default for windows 21 | endif() 22 | 23 | # our usage flags 24 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWIN32 -D_CRT_SECURE_NO_WARNINGS") 25 | 26 | # flags for clang direct use 27 | # -Wno-ignored-attributes to avoid warning: __declspec attribute 'dllexport' is not supported [-Wignored-attributes] which is used by msvc compiler 28 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -fms-extensions -fms-compatibility -Wno-ignored-attributes") 29 | 30 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__HIP_PLATFORM_AMD__ -D__HIP_ROCclr__") 31 | 32 | if (DEFINED ENV{VCPKG_PATH}) 33 | file(TO_CMAKE_PATH "$ENV{VCPKG_PATH}" VCPKG_PATH) 34 | else() 35 | set(VCPKG_PATH "C:/github/vcpkg") 36 | endif() 37 | include("${VCPKG_PATH}/scripts/buildsystems/vcpkg.cmake") 38 | --------------------------------------------------------------------------------