Functions for sorting Vec's.
|
template<SortSlope SLOPE, typename T , size_t SIMD_WIDTH> |
static void | simd::bitonicSort (Vec< T, SIMD_WIDTH > vecs[Vec< T, SIMD_WIDTH >::elems]) |
| Sorts multiple Vec's independently using the bitonic sort algorithm.
|
|
template<SortSlope SLOPE, typename T , size_t SIMD_WIDTH> |
static void | simd::bitonicSortSortedPairs (Vec< T, SIMD_WIDTH > vecs[Vec< T, SIMD_WIDTH >::elems]) |
| Fuses consecutive pairs of sorted Vec's such that the pair is sorted over the two vectors.
|
|
template<size_t LENGTH, SortSlope SLOPE, typename T , size_t SIMD_WIDTH> |
static void | simd::verticalBitonicSort (T data[LENGTH]) |
| Sorts data vector using vertical version of bitonic sort. Assumes that data size is a power of 2 times the number of elements in a SIMD vector squared; if not, a static assertion is raised. Note: This function has not been subjected to auto-tests.
|
|
◆ bitonicSort()
template<
SortSlope SLOPE, typename T , size_t SIMD_WIDTH>
static void simd::bitonicSort |
( |
Vec< T, SIMD_WIDTH > | vecs[Vec< T, SIMD_WIDTH >::elems] | ) |
|
|
inlinestatic |
Sorts multiple Vec's independently using the bitonic sort algorithm.
- Template Parameters
-
SLOPE | direction to sort in (SortSlope::ASCENDING or SortSlope::DESCENDING) |
- Parameters
-
[in,out] | vecs | array of Vec's to sort |
◆ bitonicSortSortedPairs()
template<
SortSlope SLOPE, typename T , size_t SIMD_WIDTH>
static void simd::bitonicSortSortedPairs |
( |
Vec< T, SIMD_WIDTH > | vecs[Vec< T, SIMD_WIDTH >::elems] | ) |
|
|
inlinestatic |
Fuses consecutive pairs of sorted Vec's such that the pair is sorted over the two vectors.
- Template Parameters
-
SLOPE | direction to sort in (SortSlope::ASCENDING or SortSlope::DESCENDING) |
- Parameters
-
vecs | array of Vec's to sort (Vec's must be sorted individually) |
◆ verticalBitonicSort()
template<size_t LENGTH,
SortSlope SLOPE, typename T , size_t SIMD_WIDTH>
static void simd::verticalBitonicSort |
( |
T | data[LENGTH] | ) |
|
|
inlinestatic |
Sorts data vector using vertical version of bitonic sort. Assumes that data size is a power of 2 times the number of elements in a SIMD vector squared; if not, a static assertion is raised. Note: This function has not been subjected to auto-tests.
- Template Parameters
-
LENGTH | length of data vector |
SLOPE | direction to sort in (SortSlope::ASCENDING or SortSlope::DESCENDING) |
- Parameters
-
data | vector of data (may be unaligned) |