This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
Thrust 1.9.9 (CUDA Toolkit 11.0)
Thrust 1.9.9 adds support for NVC++, which uses Thrust to implement GPU-accelerated C++17 Parallel Algorithms. thrust::zip_function
and thrust::shuffle
were also added. As of this release, C++03, C++11, GCC < 5, Clang < 6, and MSVC < 2017 are deprecated. Starting with the upcoming 1.10.0 release, C++03 support will be dropped entirely. All other deprecated platforms will be dropped in the near future.
Breaking Changes
- #1082: Thrust now checks that it is compatible with the version of CUB found in your include path, generating an error if it is not. If you are using your own verison of CUB, it may be too old. It is recommended to simply delete your own version of CUB and use the version of CUB that comes with Thrust.
- #1089 C++03 and C++11 are deprecated. Using these dialects will generate a compile-time warning. These warnings can be suppressed by defining
THRUST_IGNORE_DEPRECATED_CPP_DIALECT
(to suppress C++03 and C++11 deprecation warnings) orTHRUST_IGNORE_DEPRECATED_CPP11
(to suppress C++11 deprecation warnings). Suppression is only a short term solution. We will be dropping support for C++03 in the 1.10.0 release and C++11 in the near future. - #1089: GCC < 5, Clang < 6, and MSVC < 2017 are deprecated. Using these compilers will generate a compile-time warning. These warnings can be suppressed by defining
THRUST_IGNORE_DEPRECATED_COMPILER
. Suppression is only a short term solution. We will be dropping support for these compilers in the near future.
New Features
- #1086: Support for NVC++ aka "Feta". The most significant change is in how we use
__CUDA_ARCH__
. Now, there are four macros that must be used:THRUST_IS_DEVICE_CODE
, which should be used in anif
statement around device-only code.THRUST_INCLUDE_DEVICE_CODE
, which should be used in an#if
preprocessor directive inside of theif
statement mentioned in the prior bullet.THRUST_IS_HOST_CODE
, which should be used in anif
statement around host-only code.THRUST_INCLUDE_HOST_CODE
, which should be used in an#if
preprocessor directive inside of theif
statement mentioned in the prior bullet.
- #1085:
thrust::shuffle
. Thanks to Rory Mitchell for this contribution. - #1029:
thrust::zip_function
, a facility for zipping functions that take N parameters instead of a tuple of N parameters asthrust::zip_iterator
does. Thanks to Ben Jude for this contribution. - #1068:
thrust::system::cuda::managed_memory_pointer
, a universal memory strongly typed pointer compatible with the ISO C++ Standard Library.
Other Enhancements
- #1029: Thrust is now built and tested with NVCC warnings treated as errors.
- #1029: MSVC C++11 support.
- #1029:
THRUST_DEPRECATED
abstraction for generating compile-time deprecation warning messages. - #1029:
thrust::pointer<T>::pointer_to(reference)
. - #1070: Unit test for
thrust::inclusive_scan
with a user defined types. Thanks to Conor Hoekstra for this contribution.
Bug Fixes
- #1088: Allow
thrust::replace
to take functions that have non-const
operator()
. - #1094: Add missing
constexpr
topar_t
constructors. Thanks to Patrick Stotko for this contribution. - #1077: Remove
__device__
from CUDA MR-based device allocators to fix obscure "host function called from host device function" warning that occurs when you use the new Thrust MR-based allocators. - #1029: Remove inconsistently-used
THRUST_BEGIN
/END_NS
macros. - #1029: Fix C++ dialect detection on newer MSVC.
- #1029 Use
_Pragma
/__pragma
instead of#pragma
in macros. - #1029: Replace raw
__cplusplus
checks with the appropriate Thrust macros. - #1105: Add a missing
<math.h>
include. - #1103: Fix regression of
thrust::detail::temporary_allocator
with non-CUDA back ends. - #1111: Use Thrust's random number engine instead of
std::
s in device code. - #1108: Get rid of a GCC 9 warning about deprecated generation of copy ctors.