Produces an ArrayHandle<viskores::Id> index array that stable-sorts and optionally uniquifies an input array.
More...
#include <StableSortIndices.h>
|
template<typename KeyType , typename Storage > |
static void | Sort (viskores::cont::DeviceAdapterId device, const viskores::cont::ArrayHandle< KeyType, Storage > &keys, IndexArrayType &indices) |
| Permutes the indices array so that it will map keys into a stable sorted order. More...
|
|
template<typename KeyType , typename Storage > |
static void | Sort (const viskores::cont::ArrayHandle< KeyType, Storage > &keys, IndexArrayType &indices) |
| Permutes the indices array so that it will map keys into a stable sorted order. More...
|
|
template<typename KeyType , typename Storage > |
static IndexArrayType | Sort (viskores::cont::DeviceAdapterId device, const viskores::cont::ArrayHandle< KeyType, Storage > &keys) |
| Returns an index array that maps the keys array into a stable sorted ordering. More...
|
|
template<typename KeyType , typename Storage > |
static IndexArrayType | Sort (const viskores::cont::ArrayHandle< KeyType, Storage > &keys) |
| Returns an index array that maps the keys array into a stable sorted ordering. More...
|
|
template<typename KeyType , typename Storage > |
static void | Unique (viskores::cont::DeviceAdapterId device, const viskores::cont::ArrayHandle< KeyType, Storage > &keys, IndexArrayType &indices) |
| Reduces the array returned by Sort so that the mapped keys are unique. More...
|
|
template<typename KeyType , typename Storage > |
static void | Unique (const viskores::cont::ArrayHandle< KeyType, Storage > &keys, IndexArrayType &indices) |
| Reduces the array returned by Sort so that the mapped keys are unique. More...
|
|
Produces an ArrayHandle<viskores::Id> index array that stable-sorts and optionally uniquifies an input array.
◆ IndexArrayType
◆ Sort() [1/4]
template<typename KeyType , typename Storage >
Returns an index array that maps the keys array into a stable sorted ordering.
The keys array is not modified.
This is a convenience overload that generates the index array.
◆ Sort() [2/4]
template<typename KeyType , typename Storage >
Permutes the indices array so that it will map keys into a stable sorted order.
The keys array is not modified.
- Parameters
-
- Note
- indices is expected to contain the values (0, numKeys] in increasing order. If the values in indices are not sequential, the sort will succeed and be consistently reproducible, but the result is not guaranteed to be stable with respect to the original ordering of keys.
◆ Sort() [3/4]
template<typename KeyType , typename Storage >
Returns an index array that maps the keys array into a stable sorted ordering.
The keys array is not modified.
This is a convenience overload that generates the index array.
◆ Sort() [4/4]
template<typename KeyType , typename Storage >
Permutes the indices array so that it will map keys into a stable sorted order.
The keys array is not modified.
- Parameters
-
device | The Id for the device on which to compute the sort |
keys | The ArrayHandle containing data to be sorted. |
indices | The ArrayHandle<viskores::Id> containing the permutation indices. |
- Note
- indices is expected to contain the values (0, numKeys] in increasing order. If the values in indices are not sequential, the sort will succeed and be consistently reproducible, but the result is not guaranteed to be stable with respect to the original ordering of keys.
◆ Unique() [1/2]
template<typename KeyType , typename Storage >
Reduces the array returned by Sort so that the mapped keys are unique.
The indices array will be modified in-place and the keys array is not modified.
◆ Unique() [2/2]
template<typename KeyType , typename Storage >
Reduces the array returned by Sort so that the mapped keys are unique.
The indices array will be modified in-place and the keys array is not modified.
The documentation for this struct was generated from the following file: