40 #include "../util_macro.cuh"
41 #include "../util_type.cuh"
42 #include "../util_namespace.cuh"
63 __host__ __device__ __forceinline__
bool operator()(
const T &a,
const T &b)
const
77 __host__ __device__ __forceinline__
bool operator()(
const T &a,
const T &b)
const
87 template <
typename EqualityOp>
94 __host__ __device__ __forceinline__
99 __host__ __device__ __forceinline__
bool operator()(
const T &a,
const T &b)
const
112 template <
typename T>
113 __host__ __device__ __forceinline__ T
operator()(
const T &a,
const T &b)
const
126 template <
typename T>
127 __host__ __device__ __forceinline__ T
operator()(
const T &a,
const T &b)
const
129 return CUB_MAX(a, b);
140 template <
typename T,
typename OffsetT>
141 __host__ __device__ __forceinline__ KeyValuePair<OffsetT, T>
operator()(
142 const KeyValuePair<OffsetT, T> &a,
143 const KeyValuePair<OffsetT, T> &b)
const
148 if ((b.value > a.value) || ((a.value == b.value) && (b.key < a.key)))
161 template <
typename T>
162 __host__ __device__ __forceinline__ T
operator()(
const T &a,
const T &b)
const
164 return CUB_MIN(a, b);
175 template <
typename T,
typename OffsetT>
176 __host__ __device__ __forceinline__ KeyValuePair<OffsetT, T>
operator()(
177 const KeyValuePair<OffsetT, T> &a,
178 const KeyValuePair<OffsetT, T> &b)
const
183 if ((b.value < a.value) || ((a.value == b.value) && (b.key < a.key)))
193 template <
typename B>
197 template <
typename A>
198 __host__ __device__ __forceinline__ B
operator()(
const A &a)
const
208 template <
typename ScanOp>
219 __host__ __device__ __forceinline__
223 template <
typename T>
224 __host__ __device__ __forceinline__
227 return scan_op(b, a);
248 template <
typename ReductionOpT>
261 template <
typename KeyValuePairT>
262 __host__ __device__ __forceinline__ KeyValuePairT
operator()(
263 const KeyValuePairT &first,
264 const KeyValuePairT &second)
266 KeyValuePairT retval;
267 retval.key = first.key + second.key;
268 retval.value = (second.key) ?
270 op(first.value, second.value);
277 template <
typename ReductionOpT>
290 template <
typename KeyValuePairT>
291 __host__ __device__ __forceinline__ KeyValuePairT
operator()(
292 const KeyValuePairT &first,
293 const KeyValuePairT &second)
295 KeyValuePairT retval = second;
297 if (first.key == second.key)
298 retval.value =
op(first.value, retval.value);