[ARCHIVED] The C++ parallel algorithms library. See https://github.com/NVIDIA/cccl
transform_output_iterator
and transform_input_output_iterator
. Thanks to Mark Harris (@harrism) for this contribution.std::initializer_list
.thrust::complex
utilities. Thanks to Zishi Wu (@zishiwu123) for this contribution.__host__
functions in __device__
code.thrust::reduce_by_key
when using non-default-initializable iterators.thrust::reduce
when using a large number of inputs.Thrust 1.17.2 is a minor bugfix release that provides an updated version of CUB.
The Thrust 2.0.0 major release adds a dependency on libcu++ and contains several breaking changes. These include new diagnostics when inspecting device-only lambdas from the host, removal of the cub
symlink in the Thrust repository root, and removal of the deprecated THRUST_*_BACKEND
macros. It also includes several minor bugfixes and cleanups.
${THRUST_ROOT}/dependencies/libcudacxx/
submodule.-I ${THRUST_ROOT}/dependencies/libcudacxx/include/
).THRUST_PROVIDE_LEGACY_ARCH_MACROS
. These will be removed completely in a future release.
THRUST_IS_HOST_CODE
: Replace with NV_IF_TARGET
.THRUST_IS_DEVICE_CODE
: Replace with NV_IF_TARGET
.THRUST_INCLUDE_HOST_CODE
: Replace with NV_IF_TARGET
.THRUST_INCLUDE_DEVICE_CODE
: Replace with NV_IF_TARGET
.THRUST_DEVICE_CODE
: Replace with NV_IF_TARGET
.NV_IF_TARGET
. They are now defined consistently across all host/device compilation passes. This should not affect most usages of these macros, but may require changes for some edge cases.
THRUST_RUNTIME_FUNCTION
: Execution space annotations for functions that invoke CUDA Runtime APIs.
__host__ __device__
__host__ __device__
__host__
__host__ __device__
__host__
__THRUST_HAS_CUDART__
: No change in behavior, but no longer used in Thrust. Provided for legacy support only. Legacy behavior:
THRUST_RDC_ENABLED
: New macro, may be combined with NV_IF_TARGET
to replace most usages of __THRUST_HAS_CUDART__
. Behavior:
cub
symlink from the root of the Thrust repository.
-I ${THRUST_ROOT}/dependencies/cub
).add_subdirectory
, or find_package
are not affected.__device__
-only lambda’s return type is queried from host code (requires libcu++ ≥ 1.9.0).
__device__
-only implementation of operator()
.__host__ __device__
lambda.cuda::proclaim_return_type
(Added in libcu++ 1.9.0)THRUST_DEVICE_BACKEND
and THRUST_HOST_BACKEND
macros. The THRUST_DEVICE_SYSTEM
and THRUST_HOST_SYSTEM
macros should be used instead.iterator_category_to_traversal
metafunctions.__thrust_exec_check_disable__
annotation to thrust::make_zip_function
. Thanks to @mfbalin for this contribution.copy_if
for output iterators that don’t support copy assignment. Thanks for @mfbalin for this contribution.__CUDA_ARCH__
with <nv/target>
to handle host/device code divergence.The Thrust 2.0.0 major release adds a dependency on libcu++ and contains several breaking changes. These include new diagnostics when inspecting device-only lambdas from the host, removal of the cub
symlink in the Thrust repository root, and removal of the deprecated THRUST_*_BACKEND
macros. It also includes several minor bugfixes and cleanups.
${THRUST_ROOT}/dependencies/libcudacxx/
submodule.-I ${THRUST_ROOT}/dependencies/libcudacxx/include/
).THRUST_PROVIDE_LEGACY_ARCH_MACROS
. These will be removed completely in a future release.
THRUST_IS_HOST_CODE
: Replace with NV_IF_TARGET
.THRUST_IS_DEVICE_CODE
: Replace with NV_IF_TARGET
.THRUST_INCLUDE_HOST_CODE
: Replace with NV_IF_TARGET
.THRUST_INCLUDE_DEVICE_CODE
: Replace with NV_IF_TARGET
.THRUST_DEVICE_CODE
: Replace with NV_IF_TARGET
.NV_IF_TARGET
. They are now defined consistently across all host/device compilation passes. This should not affect most usages of these macros, but may require changes for some edge cases.
THRUST_RUNTIME_FUNCTION
: Execution space annotations for functions that invoke CUDA Runtime APIs.
__host__ __device__
__host__ __device__
__host__
__host__ __device__
__host__
__THRUST_HAS_CUDART__
: No change in behavior, but no longer used in Thrust. Provided for legacy support only. Legacy behavior:
THRUST_RDC_ENABLED
: New macro, may be combined with NV_IF_TARGET
to replace most usages of __THRUST_HAS_CUDART__
. Behavior:
cub
symlink from the root of the Thrust repository.
-I ${THRUST_ROOT}/dependencies/cub
).add_subdirectory
, or find_package
are not affected.__device__
-only lambda’s return type is queried from host code (requires libcu++ ≥ 1.9.0).
__device__
-only implementation of operator()
.__host__ __device__
lambda.cuda::proclaim_return_type
(Added in libcu++ 1.9.0)THRUST_DEVICE_BACKEND
and THRUST_HOST_BACKEND
macros. The THRUST_DEVICE_SYSTEM
and THRUST_HOST_SYSTEM
macros should be used instead.iterator_category_to_traversal
metafunctions.__thrust_exec_check_disable__
annotation to thrust::make_zip_function
. Thanks to @mfbalin for this contribution.copy_if
for output iterators that don’t support copy assignment. Thanks for @mfbalin for this contribution.__CUDA_ARCH__
with <nv/target>
to handle host/device code divergence.The Thrust 2.0.0 major release adds a dependency on libcu++ and contains several breaking changes. These include new diagnostics when inspecting device-only lambdas from the host, removal of the cub
symlink in the Thrust repository root, and removal of the deprecated THRUST_*_BACKEND
macros. It also includes several minor bugfixes and cleanups.
${THRUST_ROOT}/dependencies/libcudacxx/
submodule.-I ${THRUST_ROOT}/dependencies/libcudacxx/include/
).THRUST_PROVIDE_LEGACY_ARCH_MACROS
. These will be removed completely in a future release.
THRUST_IS_HOST_CODE
: Replace with NV_IF_TARGET
.THRUST_IS_DEVICE_CODE
: Replace with NV_IF_TARGET
.THRUST_INCLUDE_HOST_CODE
: Replace with NV_IF_TARGET
.THRUST_INCLUDE_DEVICE_CODE
: Replace with NV_IF_TARGET
.THRUST_DEVICE_CODE
: Replace with NV_IF_TARGET
.NV_IF_TARGET
. They are now defined consistently across all host/device compilation passes. This should not affect most usages of these macros, but may require changes for some edge cases.
THRUST_RUNTIME_FUNCTION
: Execution space annotations for functions that invoke CUDA Runtime APIs.
__host__ __device__
__host__ __device__
__host__
__host__ __device__
__host__
__THRUST_HAS_CUDART__
: No change in behavior, but no longer used in Thrust. Provided for legacy support only. Legacy behavior:
THRUST_RDC_ENABLED
: New macro, may be combined with NV_IF_TARGET
to replace most usages of __THRUST_HAS_CUDART__
. Behavior:
cub
symlink from the root of the Thrust repository.
-I ${THRUST_ROOT}/dependencies/cub
).add_subdirectory
, or find_package
are not affected.__device__
-only lambda’s return type is queried from host code (requires libcu++ ≥ 1.9.0).
__device__
-only implementation of operator()
.__host__ __device__
lambda.cuda::proclaim_return_type
(Added in libcu++ 1.9.0)THRUST_DEVICE_BACKEND
and THRUST_HOST_BACKEND
macros. The THRUST_DEVICE_SYSTEM
and THRUST_HOST_SYSTEM
macros should be used instead.iterator_category_to_traversal
metafunctions.__thrust_exec_check_disable__
annotation to thrust::make_zip_function
. Thanks to @mfbalin for this contribution.copy_if
for output iterators that don’t support copy assignment. Thanks for @mfbalin for this contribution.__CUDA_ARCH__
with <nv/target>
to handle host/device code divergence.Thrust 1.17.1 is a minor bugfix release that provides an updated version of CUB.
Thrust 1.17.0 is the final minor release of the 1.X series. This release provides GDB pretty-printers for device vectors/references, a new unique_count
algorithm, and an easier way to create tagged Thrust iterators. Several documentation fixes are included, which can be found on the new Thrust documentation site at https://nvidia.github.io/thrust. We’ll be migrating existing documentation sources to this new location over the next few months.
thrust::make_tagged_iterator
convenience function. Thanks to @karthikeyann for this contribution.unique_count
algorithm. Thanks to @upsj for this contribution.scripts/gdb-pretty-printers.py
. Thanks to @upsj for this contribution.reduce_by_key
when called with 2^31 elements.adjacent_difference
.scan_by_key
.__forceinline__
annotations to a functor wrapper. Thanks to @mkuron for this contribution.permutation_iterator
.explicit_cuda_stream.cu
example that shows how to use explicit CUDA streams and par
/par_nosync
execution policies.Thrust 1.17.0 is the final minor release of the 1.X series. This release provides GDB pretty-printers for device vectors/references, a new unique_count
algorithm, and an easier way to create tagged Thrust iterators. Several documentation fixes are included, which can be found on the new Thrust documentation site at https://nvidia.github.io/thrust. We’ll be migrating existing documentation sources to this new location over the next few months.
thrust::make_tagged_iterator
convenience function. Thanks to @karthikeyann for this contribution.unique_count
algorithm. Thanks to @upsj for this contribution.scripts/gdb-pretty-printers.py
. Thanks to @upsj for this contribution.reduce_by_key
when called with 2^31 elements.adjacent_difference
.scan_by_key
.__forceinline__
annotations to a functor wrapper. Thanks to @mkuron for this contribution.permutation_iterator
.explicit_cuda_stream.cu
example that shows how to use explicit CUDA streams and par
/par_nosync
execution policies.Thrust 1.17.0 is the final minor release of the 1.X series. This release provides GDB pretty-printers for device vectors/references, a new unique_count
algorithm, and an easier way to create tagged Thrust iterators. Several documentation fixes are included, which can be found on the new Thrust documentation site at https://nvidia.github.io/thrust. We’ll be migrating existing documentation sources to this new location over the next few months.
thrust::make_tagged_iterator
convenience function. Thanks to @karthikeyann for this contribution.unique_count
algorithm. Thanks to @upsj for this contribution.scripts/gdb-pretty-printers.py
. Thanks to @upsj for this contribution.reduce_by_key
when called with 2^31 elements.adjacent_difference
.scan_by_key
.__forceinline__
annotations to a functor wrapper. Thanks to @mkuron for this contribution.permutation_iterator
.explicit_cuda_stream.cu
example that shows how to use explicit CUDA streams and par
/par_nosync
execution policies.