30 #ifndef HIPCUB_ROCPRIM_DEVICE_DEVICE_SCAN_HPP_
31 #define HIPCUB_ROCPRIM_DEVICE_DEVICE_SCAN_HPP_
34 #include "../../../config.hpp"
36 #include "../thread/thread_operators.hpp"
38 #include <rocprim/device/device_scan.hpp>
39 BEGIN_HIPCUB_NAMESPACE
45 typename InputIteratorT,
46 typename OutputIteratorT
48 HIPCUB_RUNTIME_FUNCTION
static
49 hipError_t InclusiveSum(
void *d_temp_storage,
50 size_t &temp_storage_bytes,
52 OutputIteratorT d_out,
54 hipStream_t stream = 0,
55 bool debug_synchronous =
false)
58 d_temp_storage, temp_storage_bytes,
60 stream, debug_synchronous
65 typename InputIteratorT,
66 typename OutputIteratorT,
69 HIPCUB_RUNTIME_FUNCTION
static
70 hipError_t InclusiveScan(
void *d_temp_storage,
71 size_t &temp_storage_bytes,
73 OutputIteratorT d_out,
76 hipStream_t stream = 0,
77 bool debug_synchronous =
false)
79 return ::rocprim::inclusive_scan(
80 d_temp_storage, temp_storage_bytes,
81 d_in, d_out, num_items,
82 ::hipcub::detail::convert_result_type<InputIteratorT, OutputIteratorT>(scan_op),
83 stream, debug_synchronous
88 typename InputIteratorT,
89 typename OutputIteratorT
91 HIPCUB_RUNTIME_FUNCTION
static
92 hipError_t ExclusiveSum(
void *d_temp_storage,
93 size_t &temp_storage_bytes,
95 OutputIteratorT d_out,
97 hipStream_t stream = 0,
98 bool debug_synchronous =
false)
100 using T =
typename std::iterator_traits<InputIteratorT>::value_type;
101 return ExclusiveScan(
102 d_temp_storage, temp_storage_bytes,
104 stream, debug_synchronous
109 typename InputIteratorT,
110 typename OutputIteratorT,
114 HIPCUB_RUNTIME_FUNCTION
static
115 hipError_t ExclusiveScan(
void *d_temp_storage,
116 size_t &temp_storage_bytes,
118 OutputIteratorT d_out,
120 InitValueT init_value,
122 hipStream_t stream = 0,
123 bool debug_synchronous =
false)
125 return ::rocprim::exclusive_scan(
126 d_temp_storage, temp_storage_bytes,
127 d_in, d_out, init_value, num_items,
128 ::hipcub::detail::convert_result_type<InputIteratorT, OutputIteratorT>(scan_op),
129 stream, debug_synchronous
Definition: thread_operators.hpp:76