This file contains common sorted array manipulation routines. Aside from the functions that take a callback every function assumes that the array has a capacity large enough for the given operation.
More...
|
| LVARRAY_HOST_DEVICE constexpr bool | LvArray::sortedArrayManipulation::isSorted (Description const desc) |
| |
| LVARRAY_HOST_DEVICE constexpr bool | LvArray::sortedArrayManipulation::isUnique (Description const desc) |
| |
| template<typename RandomAccessIterator , typename Compare = less< typename std::iterator_traits< RandomAccessIterator >::value_type >> |
| DISABLE_HD_WARNING LVARRAY_HOST_DEVICE void | LvArray::sortedArrayManipulation::makeSorted (RandomAccessIterator const first, RandomAccessIterator const last, Compare &&comp=Compare()) |
| | Sort the given values in place using the given comparator. More...
|
| |
| template<typename RandomAccessIteratorA , typename RandomAccessIteratorB , typename Compare = less< typename std::iterator_traits< RandomAccessIteratorA >::value_type >> |
| DISABLE_HD_WARNING LVARRAY_HOST_DEVICE void | LvArray::sortedArrayManipulation::dualSort (RandomAccessIteratorA valueFirst, RandomAccessIteratorA valueLast, RandomAccessIteratorB dataFirst, Compare &&comp=Compare()) |
| | Sort the given values in place using the given comparator and perform the same operations on the data array thus preserving the mapping between values[i] and data[i]. More...
|
| |
| template<typename ITER , typename Compare = less< typename std::iterator_traits< ITER >::value_type >> |
| DISABLE_HD_WARNING LVARRAY_HOST_DEVICE bool | LvArray::sortedArrayManipulation::isSorted (ITER first, ITER const last, Compare &&comp=Compare()) |
| |
| template<typename ITER , typename Compare = less< typename std::iterator_traits< ITER >::value_type >> |
| DISABLE_HD_WARNING LVARRAY_HOST_DEVICE std::ptrdiff_t | LvArray::sortedArrayManipulation::removeDuplicates (ITER first, ITER const last, Compare &&comp=Compare()) |
| | Remove duplicates from the array, duplicates aren't destroyed but they're moved out of. More...
|
| |
| template<typename ITER , typename Compare = less< typename std::iterator_traits< ITER >::value_type >> |
| DISABLE_HD_WARNING LVARRAY_HOST_DEVICE std::ptrdiff_t | LvArray::sortedArrayManipulation::makeSortedUnique (ITER const first, ITER const last, Compare &&comp=Compare()) |
| | Sort and remove duplicates from the array, duplicates aren't destroyed but they're moved out of. More...
|
| |
| template<typename ITER , typename Compare = less< typename std::iterator_traits< ITER >::value_type >> |
| DISABLE_HD_WARNING LVARRAY_HOST_DEVICE bool | LvArray::sortedArrayManipulation::isSortedUnique (ITER first, ITER const last, Compare &&comp=Compare()) |
| |
| template<typename T , typename Compare = less< T >> |
| DISABLE_HD_WARNING LVARRAY_HOST_DEVICE std::ptrdiff_t | LvArray::sortedArrayManipulation::find (T const *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size, T const &value, Compare &&comp=Compare()) |
| |
| template<typename T , typename Compare = less< T >> |
| DISABLE_HD_WARNING LVARRAY_HOST_DEVICE bool | LvArray::sortedArrayManipulation::contains (T const *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size, T const &value, Compare &&comp=Compare()) |
| |
| template<typename T , typename CALLBACKS > |
| DISABLE_HD_WARNING LVARRAY_HOST_DEVICE bool | LvArray::sortedArrayManipulation::remove (T *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size, T const &value, CALLBACKS &&callBacks) |
| | Remove the given value from the array if it exists. More...
|
| |
| template<typename T , typename ITER , typename CALLBACKS = CallBacks< T >> |
| DISABLE_HD_WARNING LVARRAY_HOST_DEVICE std::ptrdiff_t | LvArray::sortedArrayManipulation::remove (T *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size, ITER const first, ITER const last, CALLBACKS &&callBacks=CALLBACKS()) |
| | Remove the given values from the array if they exist. More...
|
| |
| template<typename T , typename CALLBACKS = CallBacks< T >> |
| DISABLE_HD_WARNING LVARRAY_HOST_DEVICE bool | LvArray::sortedArrayManipulation::insert (T *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size, T const &value, CALLBACKS &&callBacks=CALLBACKS()) |
| | Insert the given value into the array if it doesn't already exist. More...
|
| |
| template<typename T , typename ITER , typename CALLBACKS = CallBacks< T >> |
| DISABLE_HD_WARNING LVARRAY_HOST_DEVICE std::ptrdiff_t | LvArray::sortedArrayManipulation::insert (T *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size, ITER const first, ITER const last, CALLBACKS &&callBacks=CALLBACKS()) |
| | Insert the given values into the array if they don't already exist. More...
|
| |
This file contains common sorted array manipulation routines. Aside from the functions that take a callback every function assumes that the array has a capacity large enough for the given operation.