Search#
- group thread_search
Functions
-
template<class AIteratorT, class BIteratorT, class OffsetT, class CoordinateT, class BinaryFunction = rocprim::less<typename std::iterator_traits<AIteratorT>::value_type>>
__host__ __device__ inline void merge_path_search(OffsetT diagonal, AIteratorT a, BIteratorT b, OffsetT a_len, OffsetT b_len, CoordinateT &path_coordinate, BinaryFunction compare_function = BinaryFunction())# Computes the begin offsets into A and B for the specific diagonal.
-
template<typename InputIteratorT, typename OffsetT, typename T>
__device__ inline OffsetT lower_bound(InputIteratorT input, OffsetT num_items, T val)# Returns the offset of the first value within
input
which does not compare less thanval
.- Template Parameters:
InputIteratorT – [inferred] Type of iterator for the input data to be searched
OffsetT – [inferred] The data type of num_items
T – [inferred] The data type of the input sequence elements
- Parameters:
input – [in] Input sequence
num_items – [in] Input sequence length
val – [in] Search Key
- Returns:
Offset at which val was found
-
template<typename InputIteratorT, typename OffsetT, typename T>
__device__ inline OffsetT upper_bound(InputIteratorT input, OffsetT num_items, T val)# Returns the offset of the first value within
input
which compares greater thanval
.- Template Parameters:
InputIteratorT – [inferred] Type of iterator for the input data to be searched
OffsetT – [inferred] The data type of num_items
T – [inferred] The data type of the input sequence elements
- Parameters:
input – [in] Input sequence
num_items – [in] Input sequence length
val – [in] Search Key
- Returns:
Offset at which val was found
-
template<int MaxNumItems, typename InputIteratorT, typename OffsetT, typename T>
__device__ inline OffsetT static_upper_bound(InputIteratorT input, OffsetT num_items, T val)# Returns the offset of the first value within
input
which compares greater thanval
computed as a statically unrolled loop.- Template Parameters:
MaxNumItems – The maximum number of items.
InputIteratorT – [inferred] Type of iterator for the input data to be searched
OffsetT – [inferred] The data type of num_items
T – [inferred] The data type of the input sequence elements
- Parameters:
input – [in] Input sequence
num_items – [in] Input sequence length
val – [in] Search Key
- Returns:
Offset at which val was found
-
template<class AIteratorT, class BIteratorT, class OffsetT, class CoordinateT, class BinaryFunction = rocprim::less<typename std::iterator_traits<AIteratorT>::value_type>>