This is a template suitable for sorting small arrays on device.
More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/core/utilities/Sorting.hpp>
template<typename T, int N = axom::numeric_limits<int>::max()>
struct axom::utilities::Sorting< T, N >
This is a template suitable for sorting small arrays on device.
- Template Parameters
-
| T | The data type being sorted. |
| N | The biggest array size that will be used. |
- Note
- For very short arrays, a simpler sort is faster. As the array size increases, the algorithm switches to qsort. Also, this is designed as a template class so it can be specialized.
◆ sort()
template<typename T , int N = axom::numeric_limits<int>::max()>
Sort an array of values in place.
- Parameters
-
| [in,out] | values | The array of values to sort. |
| n | The number of values in the array. |
References axom::utilities::insertionSort().
◆ qsort()
template<typename T , int N = axom::numeric_limits<int>::max()>
◆ partition()
template<typename T , int N = axom::numeric_limits<int>::max()>
◆ insertionSort()
template<typename T , int N = axom::numeric_limits<int>::max()>
Sort the input array using insertion sort.
- Parameters
-
| [in,out] | values | The array to be sorted. |
| n | The number of values in the array. |
References axom::utilities::swap().
◆ MAX_SIZE
template<typename T , int N = axom::numeric_limits<int>::max()>
◆ SORT_SIZE_CUTOFF
template<typename T , int N = axom::numeric_limits<int>::max()>
The documentation for this struct was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/core/utilities/Sorting.hpp