|
AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Namespaces | |
| annotations | |
| detail | |
| filesystem | |
| raii | |
| string | |
Classes | |
| struct | BitTraits |
| struct | BitTraits< std::int64_t > |
| struct | BitTraits< std::int32_t > |
| struct | BitTraits< std::int16_t > |
| struct | BitTraits< std::int8_t > |
| struct | BitTraits< std::uint64_t > |
| struct | BitTraits< std::uint32_t > |
| struct | BitTraits< std::uint16_t > |
| struct | BitTraits< std::uint8_t > |
| struct | Sorting |
| This is a template suitable for sorting small arrays on device. More... | |
| struct | Sorting< T, 3 > |
| Template specialization for sorting arrays with 3 elements. More... | |
| struct | Sorting< T, 4 > |
| Template specialization for sorting arrays with 4 elements. More... | |
| class | Timer |
| A simple Timer class to measure execution time. More... | |
| class | LexiComparator |
| Compares std::vector< T > in lexicographic order. More... | |
Functions | |
| AXOM_HOST_DEVICE int | countr_zero (std::uint64_t word) noexcept |
| Counts the number of trailing zeros in word. More... | |
| AXOM_HOST_DEVICE int | popcount (std::uint64_t word) noexcept |
| Counts the number of set bits in word. More... | |
| AXOM_HOST_DEVICE std::int32_t | countl_zero (std::int32_t word) noexcept |
| Counts the number of leading zeros in word. More... | |
| template<typename FlagType , typename BitType > | |
| constexpr AXOM_HOST_DEVICE bool | bitIsSet (FlagType flags, BitType bit) |
| Determine whether the bit is set in flags. More... | |
| template<typename FlagType , typename BitType > | |
| constexpr AXOM_HOST_DEVICE void | setBit (FlagType &flags, BitType bit, bool value=true) |
| Set the bit in flags. More... | |
| template<typename FlagType , typename BitType > | |
| constexpr AXOM_HOST_DEVICE void | setBitOn (FlagType &flags, BitType bit) |
| Set the bit in flags. More... | |
| template<typename T , typename... Args> | |
| static AXOM_HOST_DEVICE void | sort_multiple (T first, Args... args) |
| Sort multiple arrays, using the first array as the key for sorting. All other arrays are sorted the same. More... | |
| template<typename T , typename... Args> | |
| static AXOM_HOST_DEVICE void | reverse_sort_multiple (T first, Args... args) |
| Sort multiple arrays in reverse order, using the first array as the key for sorting. All other arrays are sorted the same. More... | |
| std::string | getHostName () |
| Returns the name of the machine. More... | |
| std::string | getUserName () |
| Returns the name of the current user. More... | |
| std::locale | locale (const std::string &name="en_US.UTF-8") |
| Returns a valid locale for the current system. More... | |
| void | processAbort () |
| Gracefully aborts the application. More... | |
| template<typename T > | |
| AXOM_HOST_DEVICE T | abs (const T &x) |
| Returns the absolute value of x. More... | |
| template<typename T > | |
| AXOM_HOST_DEVICE T | floor (const T &x) |
| Returns the largest integer less than or equal to x. More... | |
| template<typename T > | |
| AXOM_HOST_DEVICE T | ceil (const T &x) |
| Returns the smallest integer greater than or equal to x. More... | |
| template<typename T > | |
| AXOM_HOST_DEVICE const T & | max (const T &x, const T &y) |
| Returns the max value of x and y. More... | |
| template<typename T > | |
| AXOM_HOST_DEVICE const T & | min (const T &x, const T &y) |
| Returns the min value of x and y. More... | |
| template<typename T > | |
| AXOM_HOST_DEVICE void | swap (T &a, T &b) |
| Swaps the values of a, b. More... | |
| template<typename T > | |
| AXOM_HOST_DEVICE T | fma (const T &a, const T &b, const T &c) |
| Returns the fused-multiply-add of a, b, and c. More... | |
| template<typename T > | |
| T | log2 (T val) |
| Returns the base 2 logarithm of the input. More... | |
| template<typename T > | |
| AXOM_HOST_DEVICE T | lerp (T v0, T v1, T t) |
| Linearly interpolates between two values. More... | |
| template<typename T > | |
| AXOM_HOST_DEVICE T | clampVal (T val, T lower, T upper) |
| Clamps an input value to a given range. More... | |
| template<typename T > | |
| AXOM_HOST_DEVICE T | clampUpper (T val, T upper) |
| Clamps the upper range on an input value. More... | |
| template<typename T > | |
| AXOM_HOST_DEVICE T | clampLower (T val, T lower) |
| Clamps the lower range on an input value. More... | |
| template<typename T > | |
| constexpr AXOM_HOST_DEVICE bool | inBounds_0_N (T value, T upper) |
| Determine whether a value is in [0,upper). More... | |
| int | binomialCoefficient (int n, int k) |
Computes the binomial coefficient n choose k More... | |
| template<typename T > | |
| T | random_real (const T &a, const T &b) |
| Returns a random real number within the specified interval. More... | |
| template<typename T > | |
| T | random_real (const T &a, const T &b, unsigned int seed) |
| Returns a random real number within the specified interval given the bounds of the interval and a seed value for the underlying random number generator. More... | |
| bool | isLittleEndian () |
| Tests the endianness of the system. More... | |
| template<typename T > | |
| constexpr T | byteswap (T val) noexcept |
| Reverses the bytes of the input value. More... | |
| template<typename RealType > | |
| AXOM_HOST_DEVICE bool | isNearlyEqual (RealType a, RealType b, RealType thresh=1.0e-8) |
| Fuzzy comparison of two real valued quantities. More... | |
| template<typename RealType > | |
| AXOM_HOST_DEVICE bool | isNearlyEqualRelative (RealType a, RealType b, RealType relThresh=1.0e-6, RealType absThresh=1.0e-8) |
| Fuzzy comparison of two real valued quantities. More... | |
| template<typename T > | |
| int | sign_of (const T &v, const T &eps={0}) |
| Sign of a value of any type that supports comparison and negation operators. More... | |
| template<typename DataType , typename Predicate = std::less<DataType>> | |
| AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE void | insertionSort (DataType *array, IndexType n, Predicate cmp={}) |
| Insertion sort of an array. More... | |
| template<typename ContainerT , typename T > | |
| AXOM_HOST_DEVICE std::int32_t | binary_search (const ContainerT &cont, T value) |
| Use binary search to find the index of the value in the supplied sorted container. More... | |
| AXOM_HOST_DEVICE std::uint64_t | hash_bytes (const std::uint8_t *data, std::uint32_t length) |
| Hash a stream of bytes into a uint64_t hash value. More... | |
|
inlinenoexcept |
Counts the number of trailing zeros in word.
|
inlinenoexcept |
Counts the number of set bits in word.
References axom::slic::inherit::masks.
|
inlinenoexcept |
Counts the number of leading zeros in word.
|
constexpr |
Determine whether the bit is set in flags.
| FlagType | The integer type that contains the flags. |
| BitType | The index type that stores the bit index. |
| [in] | flags | The flags whose bit we're testing. |
| [in] | bit | The bit we're testing. |
|
constexpr |
Set the bit in flags.
| FlagType | The integer type that contains the flags. |
| BitType | The index type that stores the bit index. |
| [in,out] | flags | The flags whose bit we're setting. |
| [in] | bit | The bit we're setting. |
| [in] | value | The value we're setting into the bit. |
|
constexpr |
Set the bit in flags.
| FlagType | The integer type that contains the flags. |
| BitType | The index type that stores the bit index. |
| [in,out] | flags | The flags whose bit we're setting. |
| [in] | bit | The bit we're setting. |
|
inlinestatic |
Sort multiple arrays, using the first array as the key for sorting. All other arrays are sorted the same.
| T | The type of the first array. |
| Args | Parameter pack containing multiple array types and an int. |
| first | The first data array. |
| args | A parameter pack of all other args. |
References axom::utilities::detail::sort_multiple_internal().
|
inlinestatic |
Sort multiple arrays in reverse order, using the first array as the key for sorting. All other arrays are sorted the same.
| T | The type of the first array. |
| Args | Parameter pack containing multiple array types and an int. |
| first | The first data array. |
| args | A parameter pack of all other args. |
References axom::utilities::detail::sort_multiple_internal().
| std::string axom::utilities::getHostName | ( | ) |
Returns the name of the machine.
| std::string axom::utilities::getUserName | ( | ) |
Returns the name of the current user.
| std::locale axom::utilities::locale | ( | const std::string & | name = "en_US.UTF-8" | ) |
Returns a valid locale for the current system.
| name | The name of the desired locale |
| void axom::utilities::processAbort | ( | ) |
Gracefully aborts the application.
|
inline |
Returns the absolute value of x.
| [in] | x | value whose absolute value is computed. |
|
inline |
Returns the largest integer less than or equal to x.
| [in] | x | value whose floor value is computed. |
|
inline |
Returns the smallest integer greater than or equal to x.
| [in] | x | value whose ceil value is computed. |
|
inline |
Returns the max value of x and y.
| [in] | x | the first value to check. |
| [in] | y | the second value to check. |
|
inline |
Returns the min value of x and y.
| [in] | x | the first value to check. |
| [in] | y | the second value to check. |
|
inline |
Swaps the values of a, b.
| [in,out] | a | 1st object to swap. |
| [in,out] | b | 2nd object to swap. |
|
inline |
Returns the fused-multiply-add of a, b, and c.
| [in] | a,b,c | the values |
|
inline |
Returns the base 2 logarithm of the input.
| [in] | val | The input value |
|
inline |
Linearly interpolates between two values.
| [in] | val0 | The first value |
| [in] | val2 | The second value |
| [in] | t | The interpolation parameter. |
|
inline |
Clamps an input value to a given range.
| [in] | val | The value to clamp. |
| [in] | lower | The lower range. |
| [in] | upper | The upper range. |
|
inline |
Clamps the upper range on an input value.
| [in] | val | The value to clamp |
| [in] | upper | The upper range |
|
inline |
Clamps the lower range on an input value.
| [in] | val | The value to clamp |
| [in] | lower | The lower range |
|
inlineconstexpr |
Determine whether a value is in [0,upper).
| value | The value to check in the range. |
| upper | The upper value for the range (non-inclusive). |
| int axom::utilities::binomialCoefficient | ( | int | n, |
| int | k | ||
| ) |
Computes the binomial coefficient n choose k
|
inline |
Returns a random real number within the specified interval.
| [in] | a | the interval's lower bound |
| [in] | b | the interval's upper bound |
| T | a built-in floating point type, e.g., double, float, long double. |
References AXOM_STATIC_ASSERT.
|
inline |
Returns a random real number within the specified interval given the bounds of the interval and a seed value for the underlying random number generator.
| [in] | a | the interval's lower bound |
| [in] | b | the interval's upper bound |
| [in] | seed | user-supplied seed for the random number generator |
| T | a built-in floating type, e.g., double, float, long double. |
References AXOM_STATIC_ASSERT.
|
inline |
Tests the endianness of the system.
|
constexprnoexcept |
Reverses the bytes of the input value.
| [in] | val | The input value |
References AXOM_STATIC_ASSERT_MSG.
|
inline |
Fuzzy comparison of two real valued quantities.
| [in] | a | The first real valued quantities we are comparing. |
| [in] | b | The second real valued quantities we are comparing. |
| [in] | thresh | The threshold of the fuzzy comparison. Default is 1.0e-8. |
References abs().
|
inline |
Fuzzy comparison of two real valued quantities.
| [in] | a | The first real valued quantities we are comparing. |
| [in] | b | The second real valued quantities we are comparing. |
| [in] | relThresh | The relative threshold of the fuzzy comparison. Default is 1.0e-6. |
| [in] | absThresh | The absolute threshold of the fuzzy comparison. Default is 1.0e-8. |
|
inline |
Sign of a value of any type that supports comparison and negation operators.
|
inline |
Insertion sort of an array.
| [in] | array | The array to sort. |
| [in] | n | The number of entries in the array. |
| [in] | cmp | The comparator to use for comparing elements; "less than" by default. |
| AXOM_HOST_DEVICE std::int32_t axom::utilities::binary_search | ( | const ContainerT & | cont, |
| T | value | ||
| ) |
Use binary search to find the index of the value in the supplied sorted container.
| ContainerT | A container or view of T. It must support size(), operator[]. |
| T | The type of elements we're handling. |
| [in] | cont | A view or container that contains the sorted search data values. |
| [in] | value | The search value. |
|
inline |
Hash a stream of bytes into a uint64_t hash value.
| [in] | data | The bytes to be hashed. |
| [in] | length | The number of bytes to be hashed. |