FastLED 3.10.8
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 416 of file algorithm.h.

416 {
417 if (last - first <= 16) { // Use insertion sort for small arrays
418 insertion_sort(first, last, comp);
419 return;
420 }
421
422 Iterator pivot = partition(first, last, comp);
423 quicksort_impl(first, pivot, comp);
424 quicksort_impl(pivot + 1, last, comp);
425}
Iterator partition(Iterator first, Iterator last, Compare comp) FL_NO_EXCEPT
Definition algorithm.h:343
void quicksort_impl(Iterator first, Iterator last, Compare comp) FL_NO_EXCEPT
Definition algorithm.h:416
void insertion_sort(Iterator first, Iterator last, Compare comp) FL_NO_EXCEPT
Definition algorithm.h:303

References fl::FL_NO_EXCEPT, insertion_sort(), partition(), and quicksort_impl().

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

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