|
template<class T , std::enable_if_t< std::is_arithmetic_v< T > &&! std::is_unsigned_v< T >, bool > = true> |
__cuda_callable__ T | abs (const T &n) |
| This function returns absolute value of given number n.
|
|
template<class T > |
const Real< T > | acos (const Real< T > &x) |
|
template<typename T > |
__cuda_callable__ auto | acos (const T &value) -> decltype(std::acos(value)) |
| This function returns the arc cosine of the given value.
|
|
template<typename T > |
__cuda_callable__ auto | acosh (const T &value) -> decltype(std::acosh(value)) |
| This function returns the inverse hyperbolic cosine of the given value.
|
|
template<typename Vector , typename T1 , typename T2 , typename Operation , typename Reduction , typename Result > |
Result | addAndReduce (Vector &lhs, const Containers::Expressions::BinaryExpressionTemplate< T1, T2, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<typename Vector , typename T1 , typename T2 , typename Operation , typename Reduction , typename Result > |
Result | addAndReduce (Vector &lhs, const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<typename Vector , typename T1 , typename Operation , typename Reduction , typename Result > |
Result | addAndReduce (Vector &lhs, const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<typename Vector , typename T1 , typename T2 , typename Operation , typename Reduction , typename Result > |
__cuda_callable__ Result | addAndReduce (Vector &lhs, const Containers::Expressions::StaticBinaryExpressionTemplate< T1, T2, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<typename Vector , typename T1 , typename Operation , typename Reduction , typename Result > |
__cuda_callable__ Result | addAndReduce (Vector &lhs, const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<typename Vector , typename T1 , typename Operation , typename Reduction , typename Result > |
Result | addAndReduce (Vector &lhs, const Containers::Expressions::UnaryExpressionTemplate< T1, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<typename Vector , typename T1 , typename T2 , typename Operation , typename Reduction , typename Result > |
Result | addAndReduceAbs (Vector &lhs, const Containers::Expressions::BinaryExpressionTemplate< T1, T2, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<typename Vector , typename T1 , typename T2 , typename Operation , typename Reduction , typename Result > |
Result | addAndReduceAbs (Vector &lhs, const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<typename Vector , typename T1 , typename Operation , typename Reduction , typename Result > |
Result | addAndReduceAbs (Vector &lhs, const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<typename Vector , typename T1 , typename T2 , typename Operation , typename Reduction , typename Result > |
__cuda_callable__ Result | addAndReduceAbs (Vector &lhs, const Containers::Expressions::StaticBinaryExpressionTemplate< T1, T2, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<typename Vector , typename T1 , typename Operation , typename Reduction , typename Result > |
__cuda_callable__ Result | addAndReduceAbs (Vector &lhs, const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<typename Vector , typename T1 , typename Operation , typename Reduction , typename Result > |
Result | addAndReduceAbs (Vector &lhs, const Containers::Expressions::UnaryExpressionTemplate< T1, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<typename T1 , typename T2 , typename ResultType = std::common_type_t< T1, T2 >> |
__cuda_callable__ ResultType | argAbsMax (const T1 &a, const T2 &b) |
|
template<typename T1 , typename T2 , typename ResultType = std::common_type_t< T1, T2 >> |
__cuda_callable__ ResultType | argAbsMin (const T1 &a, const T2 &b) |
|
template<typename T1 , typename T2 , typename ResultType = std::common_type_t< T1, T2 >> |
constexpr ResultType | argMax (const T1 &a, const T2 &b) |
|
template<typename T1 , typename T2 , typename ResultType = std::common_type_t< T1, T2 >> |
constexpr ResultType | argMin (const T1 &a, const T2 &b) |
|
template<class T > |
const Real< T > | asin (const Real< T > &x) |
|
template<typename T > |
__cuda_callable__ auto | asin (const T &value) -> decltype(std::asin(value)) |
| This function returns the arc sine of the given value.
|
|
template<typename T > |
__cuda_callable__ auto | asinh (const T &value) -> decltype(std::asinh(value)) |
| This function returns the inverse hyperbolic sine of the given value.
|
|
template<class T > |
const Real< T > | atan (const Real< T > &x) |
|
template<typename T > |
__cuda_callable__ auto | atan (const T &value) -> decltype(std::atan(value)) |
| This function returns the arc tangent of the given value.
|
|
template<class T > |
const Real< T > | atan2 (const Real< T > &x, const Real< T > &exp) |
|
template<class T > |
const Real< T > | atan2 (const Real< T > &x, const T &exp) |
|
template<typename T > |
__cuda_callable__ auto | atan2 (const T &y, const T &x) -> decltype(std::atan2(y, x)) |
| This function returns the arc tangent of y/x using the signs of arguments to determine the correct quadrant.
|
|
template<typename T > |
__cuda_callable__ auto | atanh (const T &value) -> decltype(std::atanh(value)) |
| This function returns the inverse hyperbolic tangent of the given value.
|
|
template<typename T > |
std::set< std::vector< T > > | cartesianPower (std::vector< T > array, int N) |
| Calculates the cartesian power of elements in an array: array^N .
|
|
template<typename T > |
__cuda_callable__ auto | cbrt (const T &value) -> decltype(std::cbrt(value)) |
| This function returns cubic root of the given value.
|
|
template<typename T > |
__cuda_callable__ auto | ceil (const T &value) -> decltype(std::ceil(value)) |
| This function returns the smallest integer value not less than the given value.
|
|
template<typename Index > |
constexpr Index | combinationsCount (Index k, Index n) |
| Computes the number of k-combinations in set of n element.
|
|
template<> |
String | convertToString (const bool &value) |
| Specialization of function convertToString for boolean.
|
|
template<typename T > |
String | convertToString (const T &value) |
| Converts value of type T to a String.
|
|
template<class T > |
const Real< T > | cos (const Real< T > &x) |
|
template<typename T > |
__cuda_callable__ auto | cos (const T &value) -> decltype(std::cos(value)) |
| This function returns cosine of the given value.
|
|
template<class T > |
const Real< T > | cosh (const Real< T > &x) |
|
template<typename T > |
__cuda_callable__ auto | cosh (const T &value) -> decltype(std::cosh(value)) |
| This function returns the hyperbolic cosine of the given value.
|
|
template<typename HeaderType = std::uint64_t, typename T > |
std::pair< HeaderType, std::unique_ptr< T[] > > | decompress_block (const char *data) |
| Decode and decompress data from a stream. The data must be in the format as produced by the write_compressed_block function.
|
|
template<typename HeaderType = std::uint64_t, typename T > |
std::pair< HeaderType, std::unique_ptr< T[] > > | decompress_block (std::istream &input_stream) |
| Decode and decompress data from a stream. The data must be in the format as produced by the write_compressed_block function.
|
|
template<typename T > |
std::unique_ptr< T[] > | decompress_data (const std::uint8_t *decoded_data, const std::size_t decoded_data_length, const std::size_t data_size) |
| Decompress data in given byte array and return an array of elements of type T and length data_size.
|
|
template<typename Index > |
constexpr Index | discreteLog2 (Index value) |
| Computes an integral base-2 logarithm.
|
|
template<typename Index > |
constexpr Index | discretePow (Index value, Index power) |
| Computes an integral power of an integer.
|
|
template<typename Index > |
constexpr Index | discreteProduct (Index first, Index last) |
| Computes a product of integers first * (first+1) * ... * last .
|
|
template<typename Vector , typename T1 , typename T2 , typename Operation , typename Reduction , typename Result > |
Result | evaluateAndReduce (Vector &lhs, const Containers::Expressions::BinaryExpressionTemplate< T1, T2, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<typename Vector , typename T1 , typename T2 , typename Operation , typename Reduction , typename Result > |
Result | evaluateAndReduce (Vector &lhs, const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<typename Vector , typename T1 , typename Operation , typename Reduction , typename Result > |
Result | evaluateAndReduce (Vector &lhs, const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<typename Vector , typename T1 , typename T2 , typename Operation , typename Reduction , typename Result > |
__cuda_callable__ Result | evaluateAndReduce (Vector &lhs, const Containers::Expressions::StaticBinaryExpressionTemplate< T1, T2, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<typename Vector , typename T1 , typename Operation , typename Reduction , typename Result > |
__cuda_callable__ Result | evaluateAndReduce (Vector &lhs, const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<typename Vector , typename T1 , typename Operation , typename Reduction , typename Result > |
Result | evaluateAndReduce (Vector &lhs, const Containers::Expressions::UnaryExpressionTemplate< T1, Operation > &expression, const Reduction &reduction, const Result &zero) |
|
template<class T > |
const Real< T > | exp (const Real< T > &x) |
|
template<typename T > |
__cuda_callable__ auto | exp (const T &value) -> decltype(std::exp(value)) |
| This function returns the base-e exponential of the given value.
|
|
template<class T > |
const Real< T > | fabs (const Real< T > &v) |
|
template<typename Index > |
constexpr Index | firstKCombinationsSum (Index k, Index n) |
| Computes the sum of all i-combinations in set of n elements for i from 0 up to k-1.
|
|
template<typename T > |
__cuda_callable__ auto | floor (const T &value) -> decltype(std::floor(value)) |
| This function returns largest integer value not greater than the given value.
|
|
template<typename T > |
T | forceBigEndian (T value) |
| Function takes a value and returns its big endian representation.
|
|
std::string | getCompilerName () |
| Returns the name of the compiler.
|
|
CPUCacheSizes | getCPUCacheSizes (int cpu_id=0) |
| Returns the CPU cache sizes.
|
|
CPUInfo | getCPUInfo () |
| Returns the CPU information.
|
|
int | getCPUMaxFrequency (int cpu_id=0) |
| Returns the CPU cache sizes.
|
|
std::string | getCurrentTime (const char *format="%a %b %d %Y, %H:%M:%S") |
| Returns the current time.
|
|
String | getFileExtension (const String &fileName) |
| Returns extension of given file name, i.e. part after the last dot.
|
|
std::size_t | getFreeMemory () |
| Returns the free memory in bytes.
|
|
std::string | getHostname () |
| Returns the hostname of the system.
|
|
constexpr HYPRE_MemoryLocation | getHypreMemoryLocation () |
| Returns the memory location used by Hypre objects.
|
|
String | getObjectType (const String &fileName) |
| Does the same as getObjectType but with a fileName parameter instead of file.
|
|
String | getObjectType (File &file) |
| Extracts object type from a binary file.
|
|
std::string | getOnlineCPUs () |
| Returns number of online CPUs.
|
|
template<typename T , std::enable_if_t< ! detail::HasStaticGetSerializationType< T >::value, bool > = true> |
std::string | getSerializationType () |
| Returns a string identifying a type for the purpose of serialization.
|
|
std::string | getSerializationType (Algorithms::Segments::ElementsOrganization Organization) |
|
std::string | getSystemArchitecture () |
| Returns the name of the operating system.
|
|
std::string | getSystemName () |
| Returns the name of the operating system.
|
|
std::string | getSystemRelease () |
| Returns the release of the operating system.
|
|
template<typename T > |
std::string | getType () |
| Returns a human-readable string representation of given type.
|
|
template<typename T > |
std::string | getType (T &&obj) |
| Returns a human-readable string representation of given object's type.
|
|
template<std::size_t N, typename Index > |
std::set< std::array< Index, N > > | integerFactorizationTuples (Index number) |
| Finds all possible integer factorizations of a positive integer into a product of N factors.
|
|
template<typename Index , std::enable_if_t< std::is_integral_v< Index >, bool > = true> |
bool | integerMultiplyOverflow (Index a, Index b) |
| Checks if two values of the same integral type can be multiplied without causing integer overflow or underflow.
|
|
bool | isLittleEndian () |
| Function returns true iff the system executing the program is little endian.
|
|
constexpr bool | isPow2 (int x) |
| Checks if x is an integral power of two.
|
|
constexpr bool | isPow2 (long int x) |
| Checks if x is an integral power of two.
|
|
template<typename Real > |
constexpr bool | isSmall (const Real &v, const Real &tolerance=1.0e-5) |
| This function tests whether the given real number is small.
|
|
template<typename T , typename I > |
auto | linspace (T a, T b, I n) |
|
template<class T > |
const Real< T > | log (const Real< T > &x) |
|
template<typename T > |
__cuda_callable__ auto | log (const T &value) -> decltype(std::log(value)) |
| This function returns the natural logarithm of the given value.
|
|
template<class T > |
const Real< T > | log10 (const Real< T > &x) |
|
template<typename T > |
__cuda_callable__ auto | log10 (const T &value) -> decltype(std::log10(value)) |
| This function returns the common logarithm of the given value.
|
|
template<typename T > |
__cuda_callable__ auto | log2 (const T &value) -> decltype(std::log2(value)) |
| This function returns the binary logarithm of the given value.
|
|
template<typename T1 , typename T2 , typename ResultType = std::common_type_t< T1, T2 >> |
constexpr ResultType | max (const T1 &a, const T2 &b) |
| This function returns maximum of two numbers.
|
|
template<typename T1 , typename T2 , typename T3 , typename... Ts> |
constexpr std::common_type< T1, T2, T3, Ts... >::type | max (T1 &&val1, T2 &&val2, T3 &&val3, Ts &&... vs) |
| This function returns minimum of a variadic number of inputs.
|
|
template<typename T1 , typename T2 , typename ResultType = std::common_type_t< T1, T2 >> |
constexpr ResultType | min (const T1 &a, const T2 &b) |
| This function returns minimum of two numbers.
|
|
template<typename T1 , typename T2 , typename T3 , typename... Ts> |
constexpr std::common_type< T1, T2, T3, Ts... >::type | min (T1 &&val1, T2 &&val2, T3 &&val3, Ts &&... vs) |
| This function returns minimum of a variadic number of inputs.
|
|
template<class T > |
bool | operator!= (const T &v1, const Real< T > &v2) |
|
template<class T , class S > |
const Real< T > & | operator* (const S &v1, const Real< T > &v2) |
|
String | operator+ (char string1, const String &string2) |
| Returns concatenation of string1 and string2.
|
|
String | operator+ (const char *string1, const String &string2) |
| Returns concatenation of string1 and string2.
|
|
template<class T , class S > |
const Real< T > & | operator+ (const S &v1, const Real< T > &v2) |
|
String | operator+ (const std::string &string1, const String &string2) |
| Returns concatenation of string1 and string2.
|
|
template<class T , class S > |
const Real< T > & | operator- (const S &v1, const Real< T > &v2) |
|
template<class T , class S > |
const Real< T > & | operator/ (const S &v1, const Real< T > &v2) |
|
template<class T > |
bool | operator< (const T &v1, const Real< T > &v2) |
|
File & | operator<< (File &file, const std::string &str) |
| Serialization of strings.
|
|
template<class T > |
std::ostream & | operator<< (std::ostream &str, const Real< T > &v) |
|
template<class T > |
bool | operator<= (const T &v1, const Real< T > &v2) |
|
template<class T > |
bool | operator== (const T &v1, const Real< T > &v2) |
|
template<class T > |
bool | operator> (const T &v1, const Real< T > &v2) |
|
template<class T > |
bool | operator>= (const T &v1, const Real< T > &v2) |
|
File & | operator>> (File &file, std::string &str) |
| Deserialization of strings.
|
|
std::vector< String > | parseObjectType (const String &objectType) |
| Parses the object type.
|
|
template<class T > |
const Real< T > | pow (const Real< T > &x, const Real< T > &exp) |
|
template<class T > |
const Real< T > | pow (const Real< T > &x, const T &exp) |
|
template<typename T1 , typename T2 , typename ResultType = std::common_type_t< T1, T2 >, std::enable_if_t< std::is_arithmetic_v< T1 > &&std::is_arithmetic_v< T2 >, bool > = true> |
__cuda_callable__ ResultType | pow (const T1 &base, const T2 &exp) |
| This function returns the result of base to the power of exp.
|
|
template<typename Index > |
std::vector< Index > | primeFactorization (Index number) |
| Calculates the prime factorization of a positive integer.
|
|
String | removeFileNameExtension (String fileName) |
| Cuts off the file extension.
|
|
constexpr int | roundToMultiple (int number, int multiple) |
| Rounds up number to the nearest multiple of number multiple.
|
|
constexpr int | roundUpDivision (const int num, const int div) |
| Divides num by div and rounds up the result.
|
|
void | saveObjectType (File &file, const String &type) |
| Saves object type into a binary file.
|
|
template<class T , std::enable_if_t< ! HasSubscriptOperator< T >::value, bool > = true> |
constexpr T | sign (const T &value) |
| This function represents the signum function.
|
|
template<class T > |
const Real< T > | sin (const Real< T > &x) |
|
template<typename T > |
__cuda_callable__ auto | sin (const T &value) -> decltype(std::sin(value)) |
| This function returns sine of the given value.
|
|
template<class T > |
const Real< T > | sinh (const Real< T > &x) |
|
template<typename T > |
__cuda_callable__ auto | sinh (const T &value) -> decltype(std::sinh(value)) |
| This function returns the hyperbolic sine of the given value.
|
|
template<typename T > |
__cuda_callable__ std::enable_if_t< IsScalarType< T >::value, T > | sqr (const T &value) |
| This function returns the square the given value.
|
|
template<class T > |
const Real< T > | sqrt (const Real< T > &v) |
|
template<typename T > |
__cuda_callable__ auto | sqrt (const T &value) -> decltype(std::sqrt(value)) |
| This function returns square root of the given value.
|
|
template<typename Type > |
__cuda_callable__ constexpr void | swap (Type &a, Type &b) |
| This function swaps values of two parameters.
|
|
template<typename Index > |
Index | swapBits (Index n, std::uint8_t p1, std::uint8_t p2) |
| This function swaps bits at positions p1 and p2 in an integer n.
|
|
template<typename T > |
T | swapEndianness (T u) |
| Function takes a value and swaps its endianness.
|
|
template<class T > |
const Real< T > | tan (const Real< T > &x) |
|
template<typename T > |
__cuda_callable__ auto | tan (const T &value) -> decltype(std::tan(value)) |
| This function returns tangent of the given value.
|
|
template<class T > |
const Real< T > | tanh (const Real< T > &x) |
|
template<typename T > |
__cuda_callable__ auto | tanh (const T &value) -> decltype(std::tanh(value)) |
| This function returns the hyperbolic tangent of the given value.
|
|
template<typename HeaderType = std::uint64_t, typename T > |
void | write_compressed_block (const T *data, const std::size_t data_size, std::ostream &output_stream, const int compression_level=Z_DEFAULT_COMPRESSION) |
| Use zlib to compress the data, then encode it with base64 and write the result to the given stream.
|
|