Tpetra parallel linear algebra Version of the Day
|
Declaration and definition of functions for sorting "short" arrays of keys and corresponding values. More...
#include "TpetraCore_config.h"
#include "Kokkos_Macros.hpp"
#include <type_traits>
Go to the source code of this file.
Namespaces | |
namespace | Tpetra |
Namespace Tpetra contains the class and methods constituting the Tpetra library. | |
namespace | Tpetra::Details |
Nonmember function that computes a residual Computes R = B - A * X. | |
Macros | |
#define | TPETRA_DETAILS_SWAP_KEYSANDVALUES(i, j) |
Macro that swaps the i and j entries of keys and values, if keys[i] > keys[j] (i.e., if keys[i] and keys[j] are out of order). | |
#define | TPETRA_DETAILS_SWAP_KEYS(i, j) |
Macro that swaps the i and j entries of keys, if keys[i] > keys[j] (i.e., if keys[i] and keys[j] are out of order). | |
Functions | |
template<class KeyType , class ValueType > | |
KOKKOS_FUNCTION void | Tpetra::Details::shortSortKeysAndValues_2 (KeyType keys[2], ValueType values[2]) |
Sort keys and values jointly, by keys, for arrays of length 2. | |
template<class KeyType > | |
KOKKOS_FUNCTION void | Tpetra::Details::shortSortKeys_2 (KeyType keys[2]) |
Sort length-2 array of keys. | |
template<class KeyType , class ValueType > | |
KOKKOS_FUNCTION void | Tpetra::Details::shortSortKeysAndValues_3 (KeyType keys[3], ValueType values[3]) |
Sort keys and values jointly, by keys, for arrays of length 3. | |
template<class KeyType > | |
KOKKOS_FUNCTION void | Tpetra::Details::shortSortKeys_3 (KeyType keys[3]) |
Sort length-3 array of keys. | |
template<class KeyType , class ValueType > | |
KOKKOS_FUNCTION void | Tpetra::Details::shortSortKeysAndValues_4 (KeyType keys[4], ValueType values[4]) |
Sort keys and values jointly, by keys, for arrays of length 4. | |
template<class KeyType > | |
KOKKOS_FUNCTION void | Tpetra::Details::shortSortKeys_4 (KeyType keys[4]) |
Sort length-4 array of keys. | |
template<class KeyType , class ValueType > | |
KOKKOS_FUNCTION void | Tpetra::Details::shortSortKeysAndValues_8 (KeyType keys[8], ValueType values[8]) |
Sort keys and values jointly, by keys, for arrays of length 8. | |
template<class KeyType > | |
KOKKOS_FUNCTION void | Tpetra::Details::shortSortKeys_8 (KeyType keys[8]) |
Sort length-8 array of keys. | |
template<class KeyType , class ValueType , class IndexType > | |
KOKKOS_FUNCTION void | Tpetra::Details::shellSortKeysAndValues (KeyType keys[], ValueType values[], const IndexType n) |
Shellsort (yes, it's one word) the input array keys , and apply the resulting permutation to the input array values . | |
template<class KeyType , class IndexType > | |
KOKKOS_FUNCTION void | Tpetra::Details::shellSortKeys (KeyType keys[], const IndexType n) |
Shellsort (yes, it's one word) the input array keys . | |
Declaration and definition of functions for sorting "short" arrays of keys and corresponding values.
"Short" means "having few entries." This matters because optimal (in terms of fewest comparisons) sorting algorithms are different for short arrays.
Definition in file Tpetra_Details_shortSort.hpp.
#define TPETRA_DETAILS_SWAP_KEYSANDVALUES | ( | i, | |
j | |||
) |
Macro that swaps the i and j entries of keys and values, if keys[i] > keys[j] (i.e., if keys[i] and keys[j] are out of order).
i | [in] Integer index. i <= j. |
j | [in] Integer index. i <= j. |
Captured symbols:
keys:
Array of keys; each entry has type KeyType
values:
Array of values; each entry has type ValueType
KeyType:
Type of each entry of keys
ValueType:
Type of each entry of values
Definition at line 87 of file Tpetra_Details_shortSort.hpp.
#define TPETRA_DETAILS_SWAP_KEYS | ( | i, | |
j | |||
) |
Macro that swaps the i and j entries of keys, if keys[i] > keys[j] (i.e., if keys[i] and keys[j] are out of order).
i | [in] Integer index. i <= j. |
j | [in] Integer index. i <= j. |
Captured symbols:
keys:
Array of keys; each entry has type KeyType
KeyType:
Type of each entry of keys
Definition at line 119 of file Tpetra_Details_shortSort.hpp.