Fermat
|
This module implements several host/device STL-like algorithms.
Functions | |
template<typename Iterator , typename Predicate > | |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Iterator | cugar::find_pivot (Iterator begin, const uint32 n, const Predicate predicate) |
template<typename Iterator , typename Value , typename index_type > | |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Iterator | cugar::lower_bound (const Value x, Iterator begin, const index_type n) |
template<typename Iterator , typename Value , typename index_type > | |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Iterator | cugar::upper_bound (const Value x, Iterator begin, const index_type n) |
template<typename Iterator , typename Value , typename index_type > | |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE index_type | cugar::lower_bound_index (const Value x, Iterator begin, const index_type n) |
template<typename Iterator , typename Value , typename index_type > | |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE index_type | cugar::upper_bound_index (const Value x, Iterator begin, const index_type n) |
template<typename input_iterator1 , typename input_iterator2 , typename output_iterator > | |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void | cugar::merge (input_iterator1 first1, input_iterator1 end1, input_iterator2 first2, input_iterator2 end2, output_iterator output) |
template<typename key_iterator1 , typename key_iterator2 , typename value_iterator1 , typename value_iterator2 , typename key_iterator , typename value_iterator > | |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void | cugar::merge_by_key (key_iterator1 first1, key_iterator1 end1, key_iterator2 first2, key_iterator2 end2, value_iterator1 values1, value_iterator2 values2, key_iterator output_keys, value_iterator output_values) |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Iterator cugar::find_pivot | ( | Iterator | begin, |
const uint32 | n, | ||
const Predicate | predicate | ||
) |
find the first element in a sequence for which a given predicate evaluates to true
begin | sequence start iterator |
n | sequence size |
predicate | unary predicate |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Iterator cugar::lower_bound | ( | const Value | x, |
Iterator | begin, | ||
const index_type | n | ||
) |
find the lower bound in a sequence
x | element to find |
begin | sequence start iterator |
n | sequence size |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE index_type cugar::lower_bound_index | ( | const Value | x, |
Iterator | begin, | ||
const index_type | n | ||
) |
find the lower bound in a sequence
x | element to find |
begin | sequence start iterator |
n | sequence size |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::merge | ( | input_iterator1 | first1, |
input_iterator1 | end1, | ||
input_iterator2 | first2, | ||
input_iterator2 | end2, | ||
output_iterator | output | ||
) |
merge two ranges
first1 | beginning of the first range |
end1 | end of the first range |
first2 | beginning of the second range |
end2 | end of the second range |
output | beginning of the output range |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::merge_by_key | ( | key_iterator1 | first1, |
key_iterator1 | end1, | ||
key_iterator2 | first2, | ||
key_iterator2 | end2, | ||
value_iterator1 | values1, | ||
value_iterator2 | values2, | ||
key_iterator | output_keys, | ||
value_iterator | output_values | ||
) |
merge two ranges
first1 | beginning of the first range |
end1 | end of the first range |
first2 | beginning of the second range |
end2 | end of the second range |
output | beginning of the output range |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Iterator cugar::upper_bound | ( | const Value | x, |
Iterator | begin, | ||
const index_type | n | ||
) |
find the upper bound in a sequence
x | element to find |
begin | sequence start iterator |
n | sequence size |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE index_type cugar::upper_bound_index | ( | const Value | x, |
Iterator | begin, | ||
const index_type | n | ||
) |
find the upper bound in a sequence
x | element to find |
begin | sequence start iterator |
n | sequence size |