曦云系列通用计算GPU_mcThrust API参考

目录

  • 1. ‌简介
    • 1.1. ‌安装
    • 1.2. Hello thrust
  • 2. 使用Thrust API
    • 2.1. ‌算法
      • 2.1.1. ‌复制(Copying)
        • 2.1.1.1. ‌复制
        • 2.1.1.2. 聚集(Gathering)
        • 2.1.1.3. 分散(Scattering)
      • 2.1.2. 合并(Merging)
        • 2.1.2.1. thrust::merge
        • 2.1.2.2. thrust::merge
        • 2.1.2.3. thrust::merge
        • 2.1.2.4. thrust::merge
        • 2.1.2.5. thrust::merge_by_key
        • 2.1.2.6. thrust::merge_by_key
        • 2.1.2.7. thrust::merge_by_key
        • 2.1.2.8. thrust::merge_by_key
      • 2.1.3. 前缀和(Prefix Sum)
        • 2.1.3.1. 前缀和
        • 2.1.3.2. 分段前缀和(Segmented Prefix Sums)
        • 2.1.3.3. 变换前缀和(Transformed Prefix Sum)
      • 2.1.4. 归约(Reductions)
        • 2.1.4.1. 归约
        • 2.1.4.2. 比较(Comparison)
        • 2.1.4.3. 计数(Counting)
        • 2.1.4.4. 最值(Extrema)
        • 2.1.4.5. ‌逻辑(Logical)
        • 2.1.4.6. ‌谓词(Predicate)
        • 2.1.4.7. 变换归约(Transformed Reduction)
      • 2.1.5. ‍重新排序(Reordering)
        • 2.1.5.1. ‍分区(Partitioning)
        • 2.1.5.2. ‍洗牌(Shuffling)
        • 2.1.5.3. ‌‍流压缩(Stream Compaction)
      • 2.1.6. 搜索(Searching)
        • 2.1.6.1. 搜索
        • 2.1.6.2. 二分搜索(Binary Search)
      • 2.1.7. ‌‍集合运算(Set Operation)
        • 2.1.7.1. thrust::set_difference
        • 2.1.7.2. thrust::set_difference
        • 2.1.7.3. thrust::set_difference
        • 2.1.7.4. thrust::set_difference
        • 2.1.7.5. thrust::set_intersection
        • 2.1.7.6. thrust::set_intersection
        • 2.1.7.7. thrust::set_intersection
        • 2.1.7.8. thrust::set_intersection
        • 2.1.7.9. thrust::set_symmetric_difference
        • 2.1.7.10. thrust::set_symmetric_difference
        • 2.1.7.11. thrust::set_symmetric_difference
        • 2.1.7.12. thrust::set_symmetric_difference
        • 2.1.7.13. thrust::set_union
        • 2.1.7.14. thrust::set_union
        • 2.1.7.15. thrust::set_union
        • 2.1.7.16. thrust::set_union
        • 2.1.7.17. thrust::set_difference_by_key
        • 2.1.7.18. thrust::set_difference_by_key
        • 2.1.7.19. thrust::set_difference_by_key
        • 2.1.7.20. thrust::set_difference_by_key
        • 2.1.7.21. thrust::set_intersection_by_key
        • 2.1.7.22. thrust::set_intersection_by_key
        • 2.1.7.23. thrust::set_intersection_by_key
        • 2.1.7.24. thrust::set_intersection_by_key
        • 2.1.7.25. thrust::set_symmetric_difference_by_key
        • 2.1.7.26. thrust::set_symmetric_difference_by_key
        • 2.1.7.27. thrust::set_symmetric_difference_by_key
        • 2.1.7.28. thrust::set_symmetric_difference_by_key
        • 2.1.7.29. thrust::set_union_by_key
        • 2.1.7.30. thrust::set_union_by_key
        • 2.1.7.31. thrust::set_union_by_key
        • 2.1.7.32. thrust::set_union_by_key
      • 2.1.8. 排序(Sorting)
        • 2.1.8.1. thrust::sort
        • 2.1.8.2. thrust::sort
        • 2.1.8.3. thrust::sort
        • 2.1.8.4. thrust::sort
        • 2.1.8.5. thrust::stable_sort
        • 2.1.8.6. thrust::stable_sort
        • 2.1.8.7. thrust::stable_sort
        • 2.1.8.8. thrust::stable_sort
        • 2.1.8.9. thrust::sort_by_key
        • 2.1.8.10. thrust::sort_by_key
        • 2.1.8.11. thrust::sort_by_key
        • 2.1.8.12. thrust::sort_by_key
        • 2.1.8.13. thrust::stable_sort_by_key
        • 2.1.8.14. thrust::stable_sort_by_key
        • 2.1.8.15. thrust::stable_sort_by_key
        • 2.1.8.16. thrust::stable_sort_by_key
      • 2.1.9. 变换(Transformation)
        • 2.1.9.1. 变换
        • 2.1.9.2. ‌‍填充(Filling)
        • 2.1.9.3. ‌‍修改(Modifying)
        • 2.1.9.4. ‌‍替换(Replacing)
    • 2.2. ‍容器类(Container Class)
      • 2.2.1. ‍主机容器(Host Container)
        • 2.2.1.1. thrust::host_vector
        • 2.2.1.2. thrust::swap
      • 2.2.2. 容器(Container)
        • 2.2.2.1. thrust::device_vector
        • 2.2.2.2. thrust::swap
    • 2.3. ‍‍函数对象类(Function Objects Class)
      • 2.3.1. ‍函数对象适配器(Function Object Adaptor)
        • 2.3.1.1. thrust::not1
        • 2.3.1.2. thrust::not2
        • 2.3.1.3. thrust::make_zip_function
      • 2.3.2. ‌‍占位符对象(Placeholder Object)
      • 2.3.3. ‍预定义函数对象(Predefined Function Object)
        • 2.3.3.1. 算术运算(Arithmetic Operation)
        • 2.3.3.2. ‍位运算(Bitwise Operation)
        • 2.3.3.3. ‌‍比较运算(Comparison Operation)
        • 2.3.3.4. ‍通用标识运算(Generalized Identity Operation)
        • 2.3.3.5. ‌‍逻辑运算(Logical Operation)
    • 2.4. 迭代器(Iterator)
      • 2.4.1. thrust::advance
      • 2.4.2. thrust::distance
      • 2.4.3. 高级迭代器(Fancy Iterator)
        • 2.4.3.1. thrust::make_constant_iterator
        • 2.4.3.2. thrust::make_constant_iterator
        • 2.4.3.3. thrust::make_counting_iterator
        • 2.4.3.4. thrust::make_discard_iterator
        • 2.4.3.5. thrust::make_permutation_iterator
        • 2.4.3.6. thrust::make_reverse_iterator
        • 2.4.3.7. thrust::make_transform_input_output_iterator
        • 2.4.3.8. thrust::make_transform_iterator
        • 2.4.3.9. thrust::make_transform_output_iterator
        • 2.4.3.10. thrust::make_zip_iterator
        • 2.4.3.11. thrust::make_zip_iterator
      • 2.4.4. ‍迭代器标签(Iterator Tag)
        • 2.4.4.1. ‍迭代器标签类(Iterator Tag Class)
        • 2.4.4.2. thrust::input_host_iterator_tag
        • 2.4.4.3. thrust::output_host_iterator_tag
        • 2.4.4.4. thrust::forward_host_iterator_tag
        • 2.4.4.5. thrust::bidirectional_host_iterator_tag
        • 2.4.4.6. thrust::random_access_host_iterator_tag
    • 2.5. ‍内存管理(Memory Management)
      • 2.5.1. ‍内存管理
        • 2.5.1.1. thrust::device_reference
        • 2.5.1.2. thrust::device_ptr
        • 2.5.1.3. thrust::device_delete
        • 2.5.1.4. thrust::device_free
        • 2.5.1.5. thrust::device_malloc
        • 2.5.1.6. thrust::device_malloc
        • 2.5.1.7. thrust::device_new
        • 2.5.1.8. thrust::device_new
        • 2.5.1.9. thrust::device_new
        • 2.5.1.10. thrust::operator<<
        • 2.5.1.11. thrust::device_pointer_cast
        • 2.5.1.12. thrust::device_pointer_cast
        • 2.5.1.13. thrust::swap
        • 2.5.1.14. thrust::operator<<
        • 2.5.1.15. thrust::malloc
        • 2.5.1.16. thrust::malloc
        • 2.5.1.17. thrust::get_temporary_buffer
        • 2.5.1.18. thrust::free
        • 2.5.1.19. thrust::return_temporary_buffer
        • 2.5.1.20. thrust::raw_pointer_cast
        • 2.5.1.21. thrust::raw_reference_cast
        • 2.5.1.22. thrust::raw_reference_cast
      • 2.5.2. ‌‍分配器(Allocator)
        • 2.5.2.1. thrust::mr::polymorphic_allocator
        • 2.5.2.2. thrust::mr::operator==
        • 2.5.2.3. thrust::mr::operator!=
      • 2.5.3. ‌‍内存资源(Memory Resources)
        • 2.5.3.1. thrust::system::cpp::memory_resource
        • 2.5.3.2. thrust::system::cpp::universal_memory_resource
        • 2.5.3.3. thrust::system::cpp::universal_host_pinned_memory_resource
        • 2.5.3.4. thrust::system::omp::memory_resource
        • 2.5.3.5. thrust::system::omp::universal_memory_resource
        • 2.5.3.6. thrust::system::omp::universal_host_pinned_memory_resource
        • 2.5.3.7. thrust::system::tbb::memory_resource
        • 2.5.3.8. thrust::system::tbb::universal_memory_resource
        • 2.5.3.9. thrust::system::tbb::universal_host_pinned_memory_resource
        • 2.5.3.10. thrust::universal_ptr
        • 2.5.3.11. thrust::mr::tls_disjoint_pool
        • 2.5.3.12. thrust::mr::operator==
        • 2.5.3.13. thrust::mr::operator!=
        • 2.5.3.14. thrust::mr::get_global_resource
        • 2.5.3.15. thrust::mr::tls_pool
    • 2.6. ‌‍数值(Numeric)
      • 2.6.1. ‍复数(Cmplex Number)
        • 2.6.1.1. thrust::complex::complex
        • 2.6.1.2. thrust::complex::complex
        • 2.6.1.3. thrust::complex::complex
        • 2.6.1.4. thrust::complex::complex
        • 2.6.1.5. thrust::complex::complex
        • 2.6.1.6. thrust::complex::complex
        • 2.6.1.7. thrust::complex::complex
        • 2.6.1.8. thrust::complex::operator=
        • 2.6.1.9. thrust::complex::operator=
        • 2.6.1.10. thrust::complex::operator=
        • 2.6.1.11. thrust::complex::operator=
        • 2.6.1.12. thrust::complex::operator=
        • 2.6.1.13. thrust::complex::operator+=
        • 2.6.1.14. thrust::complex::operator-=
        • 2.6.1.15. thrust::complex::operator*=
        • 2.6.1.16. thrust::complex::operator/=
        • 2.6.1.17. thrust::complex::operator+=
        • 2.6.1.18. thrust::complex::operator-=
        • 2.6.1.19. thrust::complex::operator*=
        • 2.6.1.20. thrust::complex::operator/=
        • 2.6.1.21. thrust::complex::real
        • 2.6.1.22. thrust::complex::imag
        • 2.6.1.23. thrust::complex::real
        • 2.6.1.24. thrust::complex::imag
        • 2.6.1.25. thrust::complex::real
        • 2.6.1.26. thrust::complex::imag
        • 2.6.1.27. thrust::complex::real
        • 2.6.1.28. thrust::complex::imag
        • 2.6.1.29. thrust::complex::complex< T >
        • 2.6.1.30. thrust::abs
        • 2.6.1.31. thrust::arg
        • 2.6.1.32. thrust::norm
        • 2.6.1.33. thrust::conj
        • 2.6.1.34. thrust::polar
        • 2.6.1.35. thrust::proj
        • 2.6.1.36. thrust::operator+
        • 2.6.1.37. thrust::operator+
        • 2.6.1.38. thrust::operator+
        • 2.6.1.39. thrust::operator-
        • 2.6.1.40. thrust::operator-
        • 2.6.1.41. thrust::operator-
        • 2.6.1.42. thrust::operator*
        • 2.6.1.43. thrust::operator*
        • 2.6.1.44. thrust::operator*
        • 2.6.1.45. thrust::operator/
        • 2.6.1.46. thrust::operator/
        • 2.6.1.47. thrust::operator/
        • 2.6.1.48. thrust::operator+
        • 2.6.1.49. thrust::operator-
        • 2.6.1.50. thrust::exp
        • 2.6.1.51. thrust::log
        • 2.6.1.52. thrust::log10
        • 2.6.1.53. thrust::pow
        • 2.6.1.54. thrust::pow
        • 2.6.1.55. thrust::pow
        • 2.6.1.56. thrust::sqrt
        • 2.6.1.57. thrust::cos
        • 2.6.1.58. thrust::sin
        • 2.6.1.59. thrust::tan
        • 2.6.1.60. thrust::cosh
        • 2.6.1.61. thrust::sinh
        • 2.6.1.62. thrust::tanh
        • 2.6.1.63. thrust::acos
        • 2.6.1.64. thrust::asin
        • 2.6.1.65. thrust::atan
        • 2.6.1.66. thrust::acosh
        • 2.6.1.67. thrust::asinh
        • 2.6.1.68. thrust::atanh
        • 2.6.1.69. thrust::operator<<
        • 2.6.1.70. thrust::operator>>
        • 2.6.1.71. thrust::operator==
        • 2.6.1.72. thrust::operator==
        • 2.6.1.73. thrust::operator==
        • 2.6.1.74. thrust::operator==
        • 2.6.1.75. thrust::operator==
        • 2.6.1.76. thrust::operator!=
        • 2.6.1.77. thrust::operator!=
        • 2.6.1.78. thrust::operator!=
        • 2.6.1.79. thrust::operator!=
        • 2.6.1.80. thrust::operator!=
    • 2.7. 并行执行策略(Parallel Execution Policy)
      • 2.7.1. thrust::host
      • 2.7.2. thrust::device
    • 2.8. ‍随机数生成(Random Number Generation)
      • 2.8.1. ‍带预定义参数的随机数引擎(Random Number Engines with Predefined Parameter)
        • 2.8.1.1. thrust::random::ranlux24
        • 2.8.1.2. thrust::random::ranlux48
        • 2.8.1.3. thrust::random::taus88
        • 2.8.1.4. thrust::random::default_random_engine
        • 2.8.1.5. thrust::random::minstd_rand0
        • 2.8.1.6. thrust::random::minstd_rand
        • 2.8.1.7. thrust::random::ranlux24_base
        • 2.8.1.8. thrust::random::ranlux48_base
      • 2.8.2. 随机数分布类模板(Random Number Distributions Class Template)
        • 2.8.2.1. thrust::random::normal_distribution
        • 2.8.2.2. thrust::random::uniform_int_distribution
        • 2.8.2.3. thrust::random::uniform_real_distribution
        • 2.8.2.4. thrust::random::operator==
        • 2.8.2.5. thrust::random::operator!=
        • 2.8.2.6. thrust::random::operator<<
        • 2.8.2.7. thrust::random::operator>>
        • 2.8.2.8. thrust::random::operator==
        • 2.8.2.9. thrust::random::operator!=
        • 2.8.2.10. thrust::random::operator<<
        • 2.8.2.11. thrust::random::operator>>
        • 2.8.2.12. thrust::random::operator==
        • 2.8.2.13. thrust::random::operator!=
        • 2.8.2.14. thrust::random::operator<<
        • 2.8.2.15. thrust::random::operator>>
      • 2.8.3. ‍随机数引擎适配器类模板( Random Number Engine Adaptor Class Template)
        • 2.8.3.1. thrust::random::discard_block_engine
        • 2.8.3.2. thrust::random::xor_combine_engine
        • 2.8.3.3. thrust::random::operator==
        • 2.8.3.4. thrust::random::operator!=
        • 2.8.3.5. thrust::random::operator<<
        • 2.8.3.6. thrust::random::operator>>
        • 2.8.3.7. thrust::random::operator==
        • 2.8.3.8. thrust::random::operator!=
        • 2.8.3.9. thrust::random::operator<<
        • 2.8.3.10. thrust::random::operator>>
      • 2.8.4. ‍随机数引擎类模板(Random Number Engine Adaptor Class Template)
        • 2.8.4.1. thrust::random::linear_congruential_engine
        • 2.8.4.2. thrust::random::linear_feedback_shift_engine
        • 2.8.4.3. thrust::random::subtract_with_carry_engine
        • 2.8.4.4. thrust::random::operator==
        • 2.8.4.5. thrust::random::operator!=
        • 2.8.4.6. thrust::random::operator<<
        • 2.8.4.7. thrust::random::operator>>
        • 2.8.4.8. thrust::random::operator==
        • 2.8.4.9. thrust::random::operator!=
        • 2.8.4.10. thrust::random::operator<<
        • 2.8.4.11. thrust::random::operator>>
        • 2.8.4.12. thrust::random::operator==
        • 2.8.4.13. thrust::random::operator!=
        • 2.8.4.14. thrust::random::operator<<
        • 2.8.4.15. thrust::random::operator>>
    • 2.9. ‍系统(System)
      • 2.9.1. 系统
        • 2.9.1.1. thrust::system::cpp::pointer
        • 2.9.1.2. thrust::system::cpp::universal_pointer
        • 2.9.1.3. thrust::system::cpp::reference
        • 2.9.1.4. thrust::system::omp::pointer
        • 2.9.1.5. thrust::system::omp::universal_pointer
        • 2.9.1.6. thrust::system::omp::reference
        • 2.9.1.7. thrust::system::tbb::pointer
        • 2.9.1.8. thrust::system::tbb::universal_pointer
        • 2.9.1.9. thrust::system::tbb::reference
      • 2.9.2. 系统诊断(System Diagnostics)
        • 2.9.2.1. thrust::system::is_error_code_enum
        • 2.9.2.2. thrust::system::is_error_condition_enum
        • 2.9.2.3. thrust::system::is_error_condition_enum< errc::errc_t >
        • 2.9.2.4. thrust::system::error_category
        • 2.9.2.5. thrust::system::error_code
        • 2.9.2.6. thrust::system::error_condition
        • 2.9.2.7. thrust::system::system_error
        • 2.9.2.8. thrust::system::generic_category
        • 2.9.2.9. thrust::system::system_category
        • 2.9.2.10. thrust::system::make_error_code
        • 2.9.2.11. thrust::system::operator<
        • 2.9.2.12. thrust::system::operator<<
        • 2.9.2.13. thrust::system::make_error_condition
        • 2.9.2.14. thrust::system::operator<
        • 2.9.2.15. thrust::system::operator==
        • 2.9.2.16. thrust::system::operator==
        • 2.9.2.17. thrust::system::operator==
        • 2.9.2.18. thrust::system::operator==
        • 2.9.2.19. thrust::system::operator!=
        • 2.9.2.20. thrust::system::operator!=
        • 2.9.2.21. thrust::system::operator!=
        • 2.9.2.22. thrust::system::operator!=
        • 2.9.2.23. thrust::system::system_error::system_error
        • 2.9.2.24. thrust::system::system_error::system_error
        • 2.9.2.25. thrust::system::system_error::system_error
        • 2.9.2.26. thrust::system::system_error::system_error
        • 2.9.2.27. thrust::system::system_error::system_error
        • 2.9.2.28. thrust::system::system_error::system_error
        • 2.9.2.29. thrust::system::system_error::~system_error
        • 2.9.2.30. thrust::system::system_error::code
        • 2.9.2.31. thrust::system::system_error::what
    • 2.10. ‍工具库(Utility)
      • 2.10.1. Pair
        • 2.10.1.1. thrust::pair
        • 2.10.1.2. thrust::tuple_element
        • 2.10.1.3. thrust::tuple_size
        • 2.10.1.4. thrust::operator==
        • 2.10.1.5. thrust::operator<
        • 2.10.1.6. thrust::operator!=
        • 2.10.1.7. thrust::operator>
        • 2.10.1.8. thrust::operator<=
        • 2.10.1.9. thrust::operator>=
        • 2.10.1.10. thrust::swap
        • 2.10.1.11. thrust::make_pair
      • 2.10.2. ‍交换(Swap)
        • 2.10.2.1. thrust::swap
      • 2.10.3. ‍元组(Tuple)
        • 2.10.3.1. thrust::tuple_element
        • 2.10.3.2. thrust::tuple_size
        • 2.10.3.3. thrust::tuple
        • 2.10.3.4. thrust::get
        • 2.10.3.5. thrust::get
        • 2.10.3.6. thrust::make_tuple
        • 2.10.3.7. thrust::make_tuple
        • 2.10.3.8. thrust::tie
        • 2.10.3.9. thrust::tie
        • 2.10.3.10. thrust::swap
      • 2.10.4. Type Traits
        • 2.10.4.1. thrust::proclaim_contiguous_iterator
        • 2.10.4.2. thrust::conjunction_value
        • 2.10.4.3. thrust::disjunction_value
        • 2.10.4.4. thrust::negation_value
        • 2.10.4.5. thrust::remove_cvref
        • 2.10.4.6. thrust::voider
        • 2.10.4.7. thrust::integer_sequence
        • 2.10.4.8. thrust::index_sequence
        • 2.10.4.9. thrust::make_integer_sequence
        • 2.10.4.10. thrust::make_index_sequence
        • 2.10.4.11. thrust::make_reversed_integer_sequence
        • 2.10.4.12. thrust::make_reversed_index_sequence
        • 2.10.4.13. thrust::integer_sequence_push_front
        • 2.10.4.14. thrust::integer_sequence_push_back
        • 2.10.4.15. thrust::is_contiguous_iterator
        • 2.10.4.16. thrust::is_execution_policy
        • 2.10.4.17. thrust::is_operator_less_function_object
        • 2.10.4.18. thrust::is_operator_greater_function_object
        • 2.10.4.19. thrust::is_operator_less_or_greater_function_object
        • 2.10.4.20. thrust::is_operator_plus_function_object
        • 2.10.4.21. thrust::conjunction
        • 2.10.4.22. thrust::disjunction
        • 2.10.4.23. thrust::negation
        • 2.10.4.24. thrust::remove_cvref_t
        • 2.10.4.25. thrust::is_contiguous_iterator_v
        • 2.10.4.26. thrust::is_execution_policy_v
        • 2.10.4.27. thrust::is_operator_less_function_object_v
        • 2.10.4.28. thrust::is_operator_greater_function_object_v
        • 2.10.4.29. thrust::is_operator_less_or_greater_function_object_v
        • 2.10.4.30. thrust::is_operator_plus_function_object_v
        • 2.10.4.31. thrust::conjunction_v
        • 2.10.4.32. thrust::disjunction_v
        • 2.10.4.33. thrust::negation_v
        • 2.10.4.34. thrust::conjunction_value_v
        • 2.10.4.35. thrust::disjunction_value_v
        • 2.10.4.36. thrust::negation_value_v
曦云系列通用计算GPU_mcThrust API参考
  • 搜索


© 版权所有 2025 沐曦集成电路(上海)股份有限公司。保留所有权利。