hipCUB: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-hipcub/checkouts/docs-5.4.4/hipcub/include/hipcub/backend/rocprim/thread/thread_scan.hpp Source File
30 #ifndef HIBCUB_ROCPRIM_THREAD_THREAD_SCAN_HPP_
31 #define HIBCUB_ROCPRIM_THREAD_THREAD_SCAN_HPP_
34 #include "../../../config.hpp"
35 #include "../util_type.hpp"
37 BEGIN_HIPCUB_NAMESPACE
65 for (
int i = 0; i < LENGTH; ++i)
67 inclusive = scan_op(exclusive, input[i]);
68 output[i] = exclusive;
69 exclusive = inclusive;
75 #ifndef DOXYGEN_SHOULD_SKIP_THIS // Do not document
93 bool apply_prefix =
true )
95 T inclusive = input[0];
98 inclusive = scan_op(prefix, inclusive);
101 T exclusive = inclusive;
103 return ThreadScanExclusive (inclusive, exclusive, input + 1, output + 1, scan_op, Int2Type<LENGTH - 1>());
122 bool apply_prefix =
true )
124 return ThreadScanExclusive<LENGTH>((T*) input, (T*) output, scan_op, prefix, apply_prefix);
141 for (
int i = 0; i < LENGTH; ++i)
143 inclusive = scan_op(inclusive, input[i]);
144 output[i] = inclusive;
150 #ifndef DOXYGEN_SHOULD_SKIP_THIS // Do not document
168 T inclusive = input[0];
169 output[0] = inclusive;
172 return ThreadScanInclusive (inclusive, input + 1, output + 1, scan_op, Int2Type<LENGTH - 1>());
191 return ThreadScanInclusive<LENGTH>((T*) input, (T*) output, scan_op);
210 bool apply_prefix =
true )
212 T inclusive = input[0];
215 inclusive = scan_op(prefix, inclusive);
217 output[0] = inclusive;
220 return ThreadScanInclusive (inclusive, input + 1, output + 1, scan_op, Int2Type<LENGTH - 1>());
239 bool apply_prefix =
true )
241 return ThreadScanInclusive<LENGTH>((T*) input, (T*) output, scan_op, prefix, apply_prefix);
255 #endif // HIBCUB_ROCPRIM_THREAD_THREAD_SCAN_HPP_
__device__ __forceinline__ T ThreadScanInclusive(T inclusive, T *input, T *output, ScanOp scan_op, Int2Type< LENGTH >)
Definition: thread_scan.hpp:187
__device__ __forceinline__ T ThreadScanExclusive(T inclusive, T exclusive, T *input, T *output, ScanOp scan_op, Int2Type< LENGTH >)
Definition: thread_scan.hpp:110
Internal namespace (to prevent ADL mishaps between static functions when mixing different CUB install...
Definition: thread_reduce.hpp:36