FastLED 3.9.15
Loading...
Searching...
No Matches

◆ quicksort_impl()

template<typename Iterator, typename Compare>
void fl::detail::quicksort_impl ( Iterator first,
Iterator last,
Compare comp )

Definition at line 411 of file algorithm.h.

411 {
412 if (last - first <= 16) { // Use insertion sort for small arrays
413 insertion_sort(first, last, comp);
414 return;
415 }
416
417 Iterator pivot = partition(first, last, comp);
418 quicksort_impl(first, pivot, comp);
419 quicksort_impl(pivot + 1, last, comp);
420}
void quicksort_impl(Iterator first, Iterator last, Compare comp) FL_NOEXCEPT
Definition algorithm.h:411
Iterator partition(Iterator first, Iterator last, Compare comp) FL_NOEXCEPT
Definition algorithm.h:338
void insertion_sort(Iterator first, Iterator last, Compare comp) FL_NOEXCEPT
Definition algorithm.h:298

References FL_NOEXCEPT, insertion_sort(), partition(), and quicksort_impl().

Referenced by quicksort_impl(), and fl::sort().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: