| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| #pragma once |
|
|
| #include <thrust/detail/config.h> |
|
|
| #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) |
| # pragma GCC system_header |
| #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) |
| # pragma clang system_header |
| #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) |
| # pragma system_header |
| #endif |
|
|
| #include <thrust/detail/cstdint.h> |
| #include <thrust/detail/preprocessor.h> |
| #include <thrust/detail/integer_traits.h> |
|
|
| |
| |
| |
| |
| |
| |
| #define THRUST_INDEX_TYPE_DISPATCH(status, call, count, arguments) \ |
| if (count <= thrust::detail::integer_traits<thrust::detail::int32_t>::const_max) { \ |
| auto THRUST_PP_CAT2(count, _fixed) = static_cast<thrust::detail::int32_t>(count); \ |
| status = call arguments; \ |
| } \ |
| else { \ |
| auto THRUST_PP_CAT2(count, _fixed) = static_cast<thrust::detail::int64_t>(count); \ |
| status = call arguments; \ |
| } |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #define THRUST_DOUBLE_INDEX_TYPE_DISPATCH(status, call, count1, count2, arguments) \ |
| if (count1 + count2 <= thrust::detail::integer_traits<thrust::detail::int32_t>::const_max) { \ |
| auto THRUST_PP_CAT2(count1, _fixed) = static_cast<thrust::detail::int32_t>(count1); \ |
| auto THRUST_PP_CAT2(count2, _fixed) = static_cast<thrust::detail::int32_t>(count2); \ |
| status = call arguments; \ |
| } \ |
| else { \ |
| auto THRUST_PP_CAT2(count1, _fixed) = static_cast<thrust::detail::int64_t>(count1); \ |
| auto THRUST_PP_CAT2(count2, _fixed) = static_cast<thrust::detail::int64_t>(count2); \ |
| status = call arguments; \ |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #define THRUST_INDEX_TYPE_DISPATCH2(status, call_32, call_64, count, arguments) \ |
| if (count <= thrust::detail::integer_traits<thrust::detail::int32_t>::const_max) { \ |
| auto THRUST_PP_CAT2(count, _fixed) = static_cast<thrust::detail::int32_t>(count); \ |
| status = call_32 arguments; \ |
| } \ |
| else { \ |
| auto THRUST_PP_CAT2(count, _fixed) = static_cast<thrust::detail::int64_t>(count); \ |
| status = call_64 arguments; \ |
| } |
|
|
|
|