Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
bb364d6
Add offload-compress to generate_resource_spec
matyas-streamhpc Jun 2, 2026
6f1a065
Remove ``_CCCL_INLINE_VAR`` replacement recommendation, since ``_CCCL…
matyas-streamhpc Jun 2, 2026
19ba7d4
Allow cuda::par*.on() to take cuda::stream_ref
matyas-streamhpc Jun 2, 2026
06913c4
Simplify Thrust assign_value
matyas-streamhpc Jun 2, 2026
fc7230c
Use ``[[maybe_unused]]``
matyas-streamhpc Jun 2, 2026
0f6a6dd
Make ``cuda::stream_ref`` constructible on device
matyas-streamhpc Jun 2, 2026
a918bbe
Drop ``THRUST_NODISCARD``
matyas-streamhpc Jun 2, 2026
a698802
Use libhipcxx includes - std::move
matyas-streamhpc Jun 2, 2026
e043e55
Use libhipcxx includes - limits, cmath, cfloat, cstdint, cstddef,
matyas-streamhpc Jun 12, 2026
518c37a
Use libhipcxx includes - initializer_list
matyas-streamhpc Jun 12, 2026
b94c30c
Use libhipcxx includes - cassert
matyas-streamhpc Jun 12, 2026
a3752d5
Use libhipcxx includes - make ``complex`` less dependent on host headers
matyas-streamhpc Jun 12, 2026
a077a80
Use libhipcxx includes - remove infinity test
matyas-streamhpc Jun 12, 2026
dc5ac96
Use libhipcxx includes - type_traits
matyas-streamhpc Jun 12, 2026
8988e08
Use libhipcxx includes - bad_alloc
matyas-streamhpc Jul 31, 2026
df3e6f6
Update version to 3.1.0
matyas-streamhpc Jun 12, 2026
3b1728c
Fix complex type test suite
matyas-streamhpc Jun 15, 2026
2a03e78
Replace ``__identity``
matyas-streamhpc Jun 15, 2026
efa4126
Replace deprecated C++17 iterators
matyas-streamhpc Jun 17, 2026
8b6a264
Fix thrust.compiler_interface_cpp dependency
matyas-streamhpc Jun 17, 2026
47923aa
Remove extra semicolons
matyas-streamhpc Jun 18, 2026
b3630fb
Drop superfluous semicolons
matyas-streamhpc Jun 18, 2026
daf3d03
Attempt to recover from upstream OOM in disjoint_pool
matyas-streamhpc Jun 18, 2026
8c642ba
Add ``_CCCL_WARNING``
matyas-streamhpc Jun 18, 2026
aea3b26
Improve constant_iterator and zip_iterator
matyas-streamhpc Jun 22, 2026
fa7c571
Deprecate rocThrust facilities and use libhipcxx instead
matyas-streamhpc Jun 22, 2026
c899ea1
Patch for not_fn
matyas-streamhpc Jun 24, 2026
b5a1e47
Add `reduce_into`
matyas-streamhpc Jun 29, 2026
0641c6b
Implement `shuffle_iterator` iterator type
matyas-streamhpc Jun 29, 2026
05b38ed
Add `THRUST_DISABLE_BROKEN_GCC_VECTORIZER`
matyas-streamhpc Jun 30, 2026
d089ef3
Replace std::atomic in mismatch test
matyas-streamhpc Jun 30, 2026
a96f39a
Replace use of ``__CUDACC__`` with ``_CCCL_CUDA_COMPILATION()``
matyas-streamhpc Jun 30, 2026
a9f1235
Reduce the use of `__CUDA_ARCH__`
matyas-streamhpc Jun 30, 2026
6b6e0a4
Fix header formatting
matyas-streamhpc Jun 30, 2026
5c2f20a
Use list init for test data in iterator docs
matyas-streamhpc Jun 30, 2026
8f44fdb
Make `device_reference<T>::operator=` const
matyas-streamhpc Jun 30, 2026
5d2ecb2
Add variadic ctor and CTAD to zip_iterator
matyas-streamhpc Jun 30, 2026
3189ac5
Simplify `thrust::cuda_cub::swap_ranges`
matyas-streamhpc Jun 30, 2026
a9538a1
Drop cmake workarounds for nvcc < 12
matyas-streamhpc Jun 30, 2026
c23c4d1
Add `thrust::transform_n`
matyas-streamhpc Jun 30, 2026
8e54a5c
Reorganise testframework unit test
matyas-streamhpc Jun 30, 2026
94137fa
Allow default-initializing and skipping initialization of Thrust vectors
matyas-streamhpc Jun 30, 2026
ddc5cab
Add thrust::strided_iterator and a step for thrust::counting_iterator
matyas-streamhpc Jul 2, 2026
121a33c
Small refactorings in Thrust CUDA
matyas-streamhpc Jul 3, 2026
eeb8646
Make sure that libcxx iterators play nicely with the thrust system an…
matyas-streamhpc Jul 6, 2026
a5d2f0a
Add missing header to iterator traits
matyas-streamhpc Jul 7, 2026
1f06c79
Refactor Thrust select_system
matyas-streamhpc Jul 7, 2026
4b642a1
Port `thrust::strided_iterator` to libhipcxx
matyas-streamhpc Jul 31, 2026
397fa9b
Refactor Thrust internal_functional
matyas-streamhpc Jul 31, 2026
d1655ee
Refactor thrust::minimum_type|minimum_system
matyas-streamhpc Jul 7, 2026
303242d
Port ``thrust::constant_iterator`` to libhipcxx
matyas-streamhpc Jul 7, 2026
67c50a3
Use ``hip::std::type_identity`` instead of identity-like types
matyas-streamhpc Jul 9, 2026
eb7e61a
Drop `internal::identity`
matyas-streamhpc Jul 9, 2026
f9e9167
Add trivial sort test
matyas-streamhpc Jul 9, 2026
b1090db
Update raw pointer in unwrap contiguous iterator
matyas-streamhpc Jul 9, 2026
b57e260
Drop dead code in Thrust reduce
matyas-streamhpc Jul 13, 2026
9582416
Replace ``_LIBCUDACXX_HIDE_FROM_ABI`` with ``_CCCL_API`` inline
matyas-streamhpc Jul 13, 2026
718fb64
Port ``thrust::tabulate_output_iterator`` to libhipcxx
matyas-streamhpc Jul 13, 2026
b6be5f7
Refactor thrust::sequential::sort
matyas-streamhpc Jul 13, 2026
88a1351
Refactor around thrust::vector
matyas-streamhpc Jul 13, 2026
6ab7cb5
Apply `remove_cvref` in `thrust::is_contiguous_iterator` and refactor…
matyas-streamhpc Jul 14, 2026
939c059
`thrust::cuda::pinned_memory_resource` should dispatch to the host sy…
matyas-streamhpc Jul 14, 2026
c1bcc6e
Add vectorized `cub::DeviceTransform` algorithm
matyas-streamhpc Jul 14, 2026
fc38219
Port ``thrust::transform_output_iterator`` to libhipcxx
matyas-streamhpc Jul 14, 2026
ffd36a0
Fix ``thrust::make_discard_iterator``
matyas-streamhpc Jul 14, 2026
82086c1
Port ``thrust::permutation_iterator``
matyas-streamhpc Jul 14, 2026
78cd650
Refactor generic sequence
matyas-streamhpc Jul 14, 2026
9c89d27
Update doc errors set_operations.h
matyas-streamhpc Jul 14, 2026
a90d2bd
Refactor thrust cuda replace
matyas-streamhpc Jul 14, 2026
4c61cc3
Implement ``transform[_if]_n`` in the generic system
matyas-streamhpc Jul 14, 2026
2537e61
Replace cuda version checks
matyas-streamhpc Jul 14, 2026
7e017ef
Refactor benchmark of conditional algorithms
matyas-streamhpc Jul 14, 2026
a95f236
Reimplement thrust::swap_ranges via transform
matyas-streamhpc Jul 15, 2026
d33e4e6
[Backport branch/3.1.x] Makes thrust::unique use cub::DeviceSelect::U…
matyas-streamhpc Aug 3, 2026
c11e0ad
Fixes ``thrust::unique`` for non-const ``equality_op``
matyas-streamhpc Aug 3, 2026
5bdd656
Fix `thrust::malloc` for `void`
matyas-streamhpc Jul 15, 2026
da33d8f
Use forward declarations of extended floating point types instead of …
matyas-streamhpc Jul 15, 2026
4d6164f
[Backport 3.1] Backport iterator fixes
matyas-streamhpc Aug 3, 2026
3e8ef05
[Backport to 3.1] Fix dereferencing `nullptr` in `thrust::device_refe…
matyas-streamhpc Jul 15, 2026
ecb4aea
[Backport 3.1]: [CUB] Replace several direct uses of `__clz`
matyas-streamhpc Jul 15, 2026
0186661
Bug fix: missing semicolon in utils.h CUDA implementation
matyas-streamhpc Jul 16, 2026
8ea6ed7
Update copyright year
matyas-streamhpc Jul 20, 2026
2d2430e
Remove tabulator characters
matyas-streamhpc Jul 20, 2026
abf18fb
Use libhipcxx address stability
matyas-streamhpc Jul 30, 2026
6d78b31
Fix stream getter at CUDA backend
matyas-streamhpc Aug 4, 2026
732e508
Fix formatting
matyas-streamhpc Sep 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 1 addition & 4 deletions projects/rocthrust/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ AttributeMacros: [
'THRUST_FORCEINLINE',
'THRUST_HOST_DEVICE',
'THRUST_HOST',
'THRUST_NODISCARD',
'THRUST_DEPRECATED',
'THRUST_GLOBAL_CONSTANT',
# thrust
'_CCCL_ALIGNAS_TYPE',
'_CCCL_ALIGNAS',
'_CCCL_API',
'_CCCL_CONSTEXPR_CXX14',
'_CCCL_CONSTEXPR_CXX17',
'_CCCL_CONSTEXPR_CXX20',
Expand All @@ -45,7 +45,6 @@ AttributeMacros: [
'_CCCL_HOST',
'_CCCL_NO_UNIQUE_ADDRESS',
'_CCCL_NODISCARD_FRIEND',
'_CCCL_NODISCARD',
'_CCCL_NORETURN',
'_CCCL_VISIBILITY_HIDDEN',
'CUB_RUNTIME_FUNCTION',
Expand All @@ -66,8 +65,6 @@ AttributeMacros: [
'_LIBCUDACXX_EXPORTED_FROM_ABI',
'_LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS',
'_LIBCUDACXX_HIDDEN',
'_LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1',
'_LIBCUDACXX_HIDE_FROM_ABI',
'_LIBCUDACXX_INLINE_VISIBILITY',
'_LIBCUDACXX_INTERNAL_LINKAGE',
'_LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS',
Expand Down
25 changes: 24 additions & 1 deletion projects/rocthrust/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,31 @@
Documentation for rocThrust available at
[https://rocm.docs.amd.com/projects/rocThrust/en/latest/](https://rocm.docs.amd.com/projects/rocThrust/en/latest/).

## rocThrust *.*.* for ROCm *.*.* (CCCL 3.1 parity)

### Added

* Add `THRUST_DISABLE_BROKEN_GCC_VECTORIZER`
* Add `thrust::reduce_into`.
* Add `thrust::shuffle_iterator`.
* Add `thrust::transform_n` and `thrust::transform_if_n`.

### Changed

* Replaced bad_alloc, cassert, cfloat, cmath, complex, cstddef, cstdint, cstring, initializer_list, limits, move and type_traits operators with `hip::std` operators.
* Replaced `hip::std::__identity` with `hip::std::identity`.
* Replaced ``_LIBCUDACXX_HIDE_FROM_ABI`` with ``_CCCL_API``.
* Defined `THRUST_COMP_DEPR_IMPL` with `_CCCL_WARNING`.
* Replaced `thrust::constant_iterator`, `thrust::make_discard_iterator`, `thrust::permutation_iterator`, `thrust::strided_iterator`, `thrust::tabulate_output_iterator` and `thrust::transform_output_iterator` with `hip::constant_iterator`, `hip::make_discard_iterator`, `hip::permutation_iterator`, `hip::strided_iterator`, `hip::tabulate_output_iterator` and `hip::transform_output_iterator` instead.

### Removed

* Deprecated `thrust::advance`, `thrust::bit_and`, `thrust::bit_or`, `thrust::bit_xor`, `thrust::distance`, `thrust::equal_to`, `thrust::greater`, `thrust::greater_equal`, `thrust::less`, `thrust::less_equal`, `thrust::logical_and`, `thrust::logical_not`, `thrust::logical_or`, `thrust::maximum`, `thrust::minimum`, `thrust::modulus`, `thrust::multiplies`, `thrust::negate`, `thrust::next`, `thrust::not_equal_to`, `thrust::not_fn`, `thrust::operator_name`, and `thrust::plus`. Use `hip::std::advance`, `hip::std::bit_and`, `hip::std::bit_or`, `hip::std::bit_xor`, `hip::std::distance`, `hip::std::equal_to`, `hip::std::greater`, `hip::std::greater_equal`, `hip::std::less`, `hip::std::less_equal`, `hip::std::logical_and`, `hip::std::logical_not`, `hip::std::logical_or`, `hip::maximum`, `hip::minimum`, `hip::modulus`, `hip::std::multiplies`, `hip::std::negate`, `hip::std::next`, `hip::std::not_equal_to`, `hip::std::not_fn`, `hip::std::operator_name` and `hip::std::plus` instead.
* Deprecated `thrust::detail::::identity_`. Use `hip::std::type_identity` instead.
* Removed `THRUST_NODISCARD`.

## rocThrust 5.0.0 for ROCm 10.2.0

### Added

* Largely in feature parity with CCCL/thrust v3.0.3.
Expand Down
15 changes: 2 additions & 13 deletions projects/rocthrust/benchmark/bench/copy/if.cu
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,6 @@

PRIMBENCH_REGISTER_TYPE(bench_utils::large_data, "large_data")

template <class T>
struct less_then_t
{
T m_val;

__host__ __device__ bool operator()(const T& val) const
{
return val < m_val;
}
};

template <typename T>
struct copy_benchmark : public primbench::benchmark_interface
{
Expand All @@ -69,8 +58,8 @@ struct copy_benchmark : public primbench::benchmark_interface

void run(primbench::state& state) override
{
T val = bench_utils::value_from_entropy<T>(bench_utils::get_entropy_percentage(entropy));
less_then_t<T> select_op{val};
const T val = bench_utils::lerp_min_max<T>(bench_utils::get_entropy_percentage(entropy));
bench_utils::less_then_t<T> select_op{val};

bench_utils::caching_allocator_t alloc{};
thrust::detail::device_t policy{};
Expand Down
15 changes: 2 additions & 13 deletions projects/rocthrust/benchmark/bench/partition/basic.cu
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,6 @@

#include "bench_utils.hpp"

template <class T>
struct less_then_t
{
T m_val;

__host__ __device__ bool operator()(const T& val) const
{
return val < m_val;
}
};

template <typename T>
struct partition_benchmark : public primbench::benchmark_interface
{
Expand All @@ -68,9 +57,9 @@ struct partition_benchmark : public primbench::benchmark_interface
bench_utils::caching_allocator_t alloc{};
thrust::detail::device_t policy{};

T val = bench_utils::value_from_entropy<T>(bench_utils::get_entropy_percentage(entropy_reduction));
const T val = bench_utils::lerp_min_max<T>(bench_utils::get_entropy_percentage(entropy_reduction));

less_then_t<T> select_op{val};
bench_utils::less_then_t<T> select_op{val};

thrust::device_vector<T> in = bench_utils::generate(m_items, state.seed);
thrust::device_vector<T> out(m_items);
Expand Down
3 changes: 2 additions & 1 deletion projects/rocthrust/benchmark/bench/reduce/by_key.cu
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ struct reduce_benchmark : public primbench::benchmark_interface
out_keys = in_keys;
in_vals = thrust::device_vector<T>(m_items);

const size_t unique_keys = thrust::distance(out_keys.begin(), thrust::unique(out_keys.begin(), out_keys.end()));
const size_t unique_keys =
_THRUST_STD::distance(out_keys.begin(), thrust::unique(out_keys.begin(), out_keys.end()));
thrust::device_vector<T> out_vals;
out_vals = thrust::device_vector<T>(unique_keys);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ struct base_set_benchmark : public primbench::benchmark_interface
in.cend(),
out.begin());

const size_t items_in_AB = thrust::distance(out.begin(), result_ends);
const size_t items_in_AB = _THRUST_STD::distance(out.begin(), result_ends);

state.set_items(m_items);
state.add_reads<T>(m_items);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ struct by_key_set_benchmark : public primbench::benchmark_interface
out_keys.begin(),
out_vals.begin());

const size_t item_in_AB = thrust::distance(out_keys.begin(), result_ends.first);
const size_t item_in_AB = _THRUST_STD::distance(out_keys.begin(), result_ends.first);
const size_t values_read = OpT::read_all_values ? m_items : items_in_A;

state.set_items(m_items);
Expand Down
9 changes: 4 additions & 5 deletions projects/rocthrust/benchmark/bench/transform/basic.cu
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <thrust/copy.h>
#include <thrust/count.h>
#include <thrust/detail/config/namespace.h>
#include <thrust/detail/libcxx_wrapper/__functional/address_stability.h>
#include <thrust/device_vector.h>
#include <thrust/execution_policy.h>
#include <thrust/fill.h>
Expand Down Expand Up @@ -174,7 +173,7 @@ struct mul
{
const T scalar = startScalar;
thrust::transform(
policy, c.begin(), c.end(), b.begin(), ::internal::proclaim_copyable_arguments([=] THRUST_DEVICE(const T& ci) {
policy, c.begin(), c.end(), b.begin(), _THRUST_LIBCXX::proclaim_copyable_arguments([=] THRUST_DEVICE(const T& ci) {
return ci * scalar;
}));
}
Expand All @@ -195,7 +194,7 @@ struct add
a.end(),
b.begin(),
c.begin(),
::internal::proclaim_copyable_arguments([] THRUST_DEVICE(const T& ai, const T& bi) -> T {
_THRUST_LIBCXX::proclaim_copyable_arguments([] THRUST_DEVICE(const T& ai, const T& bi) -> T {
return ai + bi;
}));
}
Expand All @@ -217,7 +216,7 @@ struct triad
b.end(),
c.begin(),
a.begin(),
::internal::proclaim_copyable_arguments([=] THRUST_DEVICE(const T& bi, const T& ci) {
_THRUST_LIBCXX::proclaim_copyable_arguments([=] THRUST_DEVICE(const T& bi, const T& ci) {
return bi + scalar * ci;
}));
}
Expand All @@ -239,7 +238,7 @@ struct nstream
thrust::make_zip_iterator(a.end(), b.end(), c.end()),
a.begin(),
thrust::make_zip_function(
::internal::proclaim_copyable_arguments([=] THRUST_DEVICE(const T& ai, const T& bi, const T& ci) {
_THRUST_LIBCXX::proclaim_copyable_arguments([=] THRUST_DEVICE(const T& ai, const T& bi, const T& ci) {
return ai + bi + scalar * ci;
})));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct transform_reduce_benchmark : public primbench::benchmark_interface

state.run([&] {
thrust::transform_reduce(
policy(alloc).on(state.stream), in.begin(), in.end(), square_t<T>{}, T{}, thrust::plus<T>{});
policy(alloc).on(state.stream), in.begin(), in.end(), square_t<T>{}, T{}, _THRUST_STD::plus<T>{});
});
}

Expand Down
2 changes: 1 addition & 1 deletion projects/rocthrust/benchmark/bench/unique/basic.cu
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ struct unique_benchmark : public primbench::benchmark_interface

// not a warm-up run, we need to run once to determine the size of the output
const auto new_end = thrust::unique_copy(policy(alloc).on(state.stream), in.cbegin(), in.cend(), out.begin());
const size_t unique_items = thrust::distance(out.begin(), new_end);
const size_t unique_items = _THRUST_STD::distance(out.begin(), new_end);

state.set_items(m_items);
state.add_reads<T>(m_items);
Expand Down
2 changes: 1 addition & 1 deletion projects/rocthrust/benchmark/bench/unique/by_key.cu
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ struct unique_benchmark : public primbench::benchmark_interface
out_keys.begin(),
out_vals.begin());

const size_t unique_elements = thrust::distance(out_keys.begin(), new_key_end);
const size_t unique_elements = _THRUST_STD::distance(out_keys.begin(), new_key_end);

state.set_items(m_items);
state.add_reads<T>(m_items);
Expand Down
38 changes: 23 additions & 15 deletions projects/rocthrust/benchmark/generation_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
// rocRAND
#include <rocrand/rocrand.h>

// LIBHIPCXX
#include _THRUST_STD_INCLUDE(cmath)
#include _THRUST_STD_INCLUDE(functional)

// STL
#include <algorithm>
#include <cstdint>
Expand Down Expand Up @@ -85,25 +89,29 @@ float get_entropy_percentage(int entropy_reduction)
}
}

// Creates an interpolated value of type T between min (at = 0.0) and max (at = 1.0).
template <typename T>
T value_from_entropy(double percentage)
[[nodiscard]] T lerp_min_max(double at) noexcept
{
if (percentage == 100.0)
if (at == 1.0)
{
return std::numeric_limits<T>::max();
return _THRUST_STD::numeric_limits<T>::max();
}

percentage /= 100; // convert percentage to per one

// Select value from the line between the lowest and the highest representable
// values of type T based on the entropy value.
const auto max_val = static_cast<double>(std::numeric_limits<T>::max());
const auto min_val = static_cast<double>(std::numeric_limits<T>::lowest());
const auto result = min_val + percentage * (max_val - min_val);
return static_cast<T>(result);
const auto min_val = static_cast<double>(_THRUST_STD::numeric_limits<T>::lowest());
const auto max_val = static_cast<double>(_THRUST_STD::numeric_limits<T>::max());
return static_cast<T>(_THRUST_STD::lerp(min_val, max_val, at));
}

const int entropy_reductions[] = {0, 2, 4, 6};
template <class T>
struct less_then_t
{
T m_val;

[[nodiscard]] __device__ bool operator()(const T& val) const noexcept
{
return val < m_val;
}
};

namespace detail
{
Expand Down Expand Up @@ -353,15 +361,15 @@ std::size_t gen_uniform_offsets(
policy,
segment_offsets.data(),
segment_offsets.data() + segment_offsets.size(),
segment_offsets.data() /*, thrust::plus<>{}*/);
segment_offsets.data() /*, _THRUST_STD::plus<>{}*/);

// Find first sum of offsets greater than 'elements', we are sure that there is
// going to be one because we added elements + 1 at the end of the segment_offsets.
auto iter = thrust::find_if(
policy, segment_offsets.data(), segment_offsets.data() + segment_offsets.size(), geq_t<T>{elements});

// Compute the element's index.
auto dist = thrust::distance(segment_offsets.data(), iter);
auto dist = _THRUST_STD::distance(segment_offsets.data(), iter);
// Fill next item with 'elements'.
thrust::fill_n(policy, segment_offsets.data() + dist, 1, elements);
// Return next item's index.
Expand Down
4 changes: 2 additions & 2 deletions projects/rocthrust/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1605,8 +1605,8 @@ Finally, a new TBB reduce_by_key implementation provides 80% faster
- `thrust::stable_partition_copy with stencil`
- `thrust::tabulate`
- Memory Allocation:
- `thrust::malloc`
- `thrust::free`
- `thrust::malloc`
- `thrust::free`
- `thrust::get_temporary_buffer`
- `thrust::return_temporary_buffer`

Expand Down
1 change: 0 additions & 1 deletion projects/rocthrust/docs/doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -2396,7 +2396,6 @@ PREDEFINED = THRUST_DOXYGEN_INVOKED \
THRUST_DEVICE_SYSTEM=5 \
THRUST_STD_VER=2017 \
THRUST_GLOBAL_CONSTANT="inline constexpr" \
THRUST_NODISCARD=[[nodiscard]] \
THRUST_MR_DEFAULT_ALIGNMENT=alignof(std::max_align_t) \
__cpp_lib_remove_cvref=201711 \
THRUST_PREVENT_MACRO_SUBSTITUTION= \
Expand Down
5 changes: 3 additions & 2 deletions projects/rocthrust/examples/constant_iterator.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All rights reserved.
// Copyright (c) 2020-2026 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -36,7 +36,8 @@ int main(void)
data[3] = 5;

// add 10 to all values in data
thrust::transform(data.begin(), data.end(), thrust::constant_iterator<int>(10), data.begin(), thrust::plus<int>());
thrust::transform(
data.begin(), data.end(), thrust::constant_iterator<int>(10), data.begin(), _THRUST_STD::plus<int>());

// data is now [13, 17, 12, 15]

Expand Down
3 changes: 1 addition & 2 deletions projects/rocthrust/examples/counting_iterator.cu
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
// SOFTWARE.

#include <thrust/copy.h>
#include <thrust/detail/libcxx_wrapper/std/__functional/identity.h>
#include <thrust/device_vector.h>
#include <thrust/functional.h>
#include <thrust/iterator/counting_iterator.h>
Expand Down Expand Up @@ -52,7 +51,7 @@ int main()
// compute indices of nonzero elements
using IndexIterator = thrust::device_vector<int>::iterator;

IndexIterator indices_end = thrust::copy_if(first, last, stencil.begin(), indices.begin(), ::internal::identity{});
IndexIterator indices_end = thrust::copy_if(first, last, stencil.begin(), indices.begin(), _THRUST_STD::identity{});
// indices now contains [1,2,5,7]

// print result
Expand Down
6 changes: 3 additions & 3 deletions projects/rocthrust/examples/cuda/async_reduce.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2025 Advanced Micro Devices, Inc. All rights reserved.
// Copyright (c) 2020-2026 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -59,7 +59,7 @@ int main()
cudaStreamCreate(&s);

// launch a CUDA kernel with only 1 thread on our stream
reduce_kernel<<<1, 1, 0, s>>>(data.begin(), data.end(), 0, thrust::plus<int>(), result.data());
reduce_kernel<<<1, 1, 0, s>>>(data.begin(), data.end(), 0, _THRUST_STD::plus<int>(), result.data());

// wait for the stream to finish
cudaStreamSynchronize(s);
Expand All @@ -77,7 +77,7 @@ int main()
auto begin = data.begin();
auto end = data.end();
unsigned int init = 0;
auto binary_op = thrust::plus<unsigned int>();
auto binary_op = _THRUST_STD::plus<unsigned int>();

// std::async captures the algorithm parameters by value
// use std::launch::async to ensure the creation of a new thread
Expand Down
4 changes: 2 additions & 2 deletions projects/rocthrust/examples/cuda/range_view.cu
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public:

__host__ __device__ difference_type size() const
{
return thrust::distance(first, last);
return _THRUST_STD::distance(first, last);
}

__host__ __device__ reference operator[](difference_type n)
Expand Down Expand Up @@ -216,7 +216,7 @@ int main()
make_range_view(thrust::make_transform_iterator(X.cbegin(), f1()), thrust::make_transform_iterator(X.cend(), f1())),

// range view of normal_iterators
make_range_view(Y.begin(), thrust::distance(Y.begin(), Y.end())),
make_range_view(Y.begin(), _THRUST_STD::distance(Y.begin(), Y.end())),

// range view of naked pointers
make_range_view(Z.data().get(), 4));
Expand Down
Loading
Loading