36#include "../util_namespace.cuh"
59 CoordinateT& path_coordinate)
62 typedef typename std::iterator_traits<AIteratorT>::value_type T;
67 while (split_min < split_max)
69 OffsetT split_pivot = (split_min + split_max) >> 1;
70 if (a[split_pivot] <= b[diagonal - split_pivot - 1])
73 split_min = split_pivot + 1;
78 split_max = split_pivot;
82 path_coordinate.x =
CUB_MIN(split_min, a_len);
83 path_coordinate.y = diagonal - split_min;
92 typename InputIteratorT,
104 if (input[retval + half] < val)
106 retval = retval + (half + 1);
123 typename InputIteratorT,
127 InputIteratorT input,
135 if (val < input[retval + half])
141 retval = retval + (half + 1);
#define CUB_MAX(a, b)
Select maximum(a, b)
#define CUB_MIN(a, b)
Select minimum(a, b)
Optional outer namespace(s)
__device__ __forceinline__ OffsetT UpperBound(InputIteratorT input, OffsetT num_items, T val)
Returns the offset of the first value within input which compares greater than val.
KeyT const ValueT ValueT OffsetT OffsetT num_items
[in] Total number of input data items
OffsetT OffsetT
[in] Total number of input data items
__host__ __device__ __forceinline__ void MergePathSearch(OffsetT diagonal, AIteratorT a, BIteratorT b, OffsetT a_len, OffsetT b_len, CoordinateT &path_coordinate)
__device__ __forceinline__ OffsetT LowerBound(InputIteratorT input, OffsetT num_items, T val)
Returns the offset of the first value within input which does not compare less than val.