rocThrust migration to CCCL 3.0.3#
Changes have been made to rocThrust to achieve parity with CCCL 3.0.3, establish a hard dependency on libhipcxx, and align with the changes made in Thrust.
Changes to platform support#
rocThrust now requires:
C++17 or later
Clang version 14 or later
GCC version 7 or later
Visual Studio 2019 or later on Windows
CUDA Dynamic Parallelism V1 (CDPv1) and Intel ICC (icpx) are no longer supported.
Changes to iterator traits#
A new standard type traits system is now provided by libhipcxx and libcudacxx.
hip::std::iterator_traits uses the new system and should be preferred over thrust::iterator_traits.
thrust::iterator_traits can no longer be specialized.
Removed macros#
Macro |
Migration guidance |
|---|---|
|
No replacement. |
|
No replacement. |
|
No replacement. |
|
No replacement. |
|
No replacement. |
|
No replacement. |
|
Use |
|
No replacement. |
|
No replacement. |
|
No replacement. |
|
Use |
|
Use |
|
No replacement. |
|
No replacement. |
|
No replacement. |
|
No replacement. |
|
No replacement. |
|
No replacement. |
|
No replacement. |
|
No replacement. |
|
Use |
|
No replacement. |
|
No replacement. |
|
No replacement. |
|
Use |
|
No direct replacement.
Use compiler-specific
__CUDA_ARCH__ (nvcc) or __NVCOMPILER_CUDA_ARCH__ (nvc++) instead. |
|
No replacement. Support for CUDA Dynamic Parallelism V1 (CDPv1) has been removed. |
Removed functions and classes#
API |
Migration guidance |
|---|---|
|
Use |
|
No replacement.
To make a thrust algorithm skip syncing, use
thrust::hip::par_nosync as the execution policy. |
|
No replacement.
The nested aliases have been removed for all function object types.
Affected types:
thrust::plus, thrust::minus, thrust::multiplies,
thrust::divides, thrust::modulus, thrust::negate, thrust::square,
thrust::equal_to, thrust::not_equal_to, thrust::greater,
thrust::less, thrust::greater_equal, thrust::less_equal,
thrust::logical_and, thrust::logical_or, thrust::logical_not,
thrust::bit_and, thrust::bit_or, thrust::bit_xor,
thrust::identity, thrust::maximum, thrust::minimum,
thrust::project1st, thrust::project2nd |
|
No replacement.
Remove any base classes that inherit from these types.
|
|
No replacement. |
|
No replacement. |
|
Use |
|
Use a fold expression: |
|
Implementation detail. No public exposure is provided. |
|
Use |
|
Use |
|
No replacement. |
|
Use |
|
Use |
|
Use |
|
Use |
|
Use a fold expression: |
|
No replacement. |
|
Use
hip::std::identity instead.If
thrust::identity was used to perform a cast to T, define a custom function object. |
|
No replacement. |
|
Use |
|
Use a plain negation |
|
Use |
|
No replacement. |
|
Use |
|
Use |
|
No replacement. |
|
No replacement. |
|
Use |
|
Use |
Deprecations with planned removal#
API |
Migration guidance |
|---|---|
|
No replacement. |
|
Use |
|
Use |
|
Use |
|
Use |
|
Use |
Aliased functions#
The following Thrust function object types have been made aliases to the equally-named types in hip::std. No change is needed if you are using these in your code.
thrust::plusthrust::minusthrust::multipliesthrust::dividesthrust::modulusthrust::negatethrust::equal_tothrust::not_equal_tothrust::greaterthrust::lessthrust::greater_equalthrust::less_equalthrust::logical_andthrust::logical_orthrust::logical_notthrust::bit_andthrust::bit_orthrust::bit_xorthrust::identitythrust::maximumthrust::minimum
Other API changes#
API |
Change |
|---|---|
|
The |
|
Converted to an alias for |
|
Converted to an alias for |
|
Copying this iterator will now always copy its contained function. If the contained function is neither copy constructible nor copy assignable, compilation will fail when an attempt is made to copy the iterator. |
|
The alias has changed to a different memory resource, potentially changing pointer types derived from an allocator or container using this memory resource. |