diff --git a/dependencies/cub b/dependencies/cub index 5cba12d5d6..0265794d47 160000 --- a/dependencies/cub +++ b/dependencies/cub @@ -1 +1 @@ -Subproject commit 5cba12d5d6fed1df78f5ac23d298dfac58be3017 +Subproject commit 0265794d47388f5817dbb27c06ca6a2357413de9 diff --git a/thrust/system/cuda/detail/async/exclusive_scan.h b/thrust/system/cuda/detail/async/exclusive_scan.h index 8735f74191..377285411a 100644 --- a/thrust/system/cuda/detail/async/exclusive_scan.h +++ b/thrust/system/cuda/detail/async/exclusive_scan.h @@ -74,17 +74,20 @@ async_exclusive_scan_n(execution_policy& policy, InitialValueType init, BinaryOp op) { + using InputValueT = cub::detail::InputValue; using Dispatch32 = cub::DispatchScan; using Dispatch64 = cub::DispatchScan; + InputValueT init_value(init); + auto const device_alloc = get_async_device_allocator(policy); unique_eager_event ev; @@ -101,7 +104,7 @@ async_exclusive_scan_n(execution_policy& policy, first, out, op, - init, + init_value, n_fixed, nullptr, THRUST_DEBUG_SYNC_FLAG)); @@ -148,7 +151,7 @@ async_exclusive_scan_n(execution_policy& policy, first, out, op, - init, + init_value, n_fixed, user_raw_stream, THRUST_DEBUG_SYNC_FLAG)); diff --git a/thrust/system/cuda/detail/scan.h b/thrust/system/cuda/detail/scan.h index 4f9628319d..6e266a8dbd 100644 --- a/thrust/system/cuda/detail/scan.h +++ b/thrust/system/cuda/detail/scan.h @@ -137,15 +137,16 @@ OutputIt exclusive_scan_n_impl(thrust::cuda_cub::execution_policy &poli InitValueT init, ScanOp scan_op) { + using InputValueT = cub::detail::InputValue; using Dispatch32 = cub::DispatchScan; using Dispatch64 = cub::DispatchScan; cudaStream_t stream = thrust::cuda_cub::stream(policy); @@ -163,7 +164,7 @@ OutputIt exclusive_scan_n_impl(thrust::cuda_cub::execution_policy &poli first, result, scan_op, - init, + InputValueT(init), num_items_fixed, stream, THRUST_DEBUG_SYNC_FLAG)); @@ -187,7 +188,7 @@ OutputIt exclusive_scan_n_impl(thrust::cuda_cub::execution_policy &poli first, result, scan_op, - init, + InputValueT(init), num_items_fixed, stream, THRUST_DEBUG_SYNC_FLAG));