![]() |
Blaze
3.6
|
Functions | |
template<typename Type > | |
BLAZE_ALWAYS_INLINE constexpr void | blaze::clear (Type &clearable) |
Clearing the given value/object to the default state. More... | |
template<typename T > | |
BLAZE_ALWAYS_INLINE constexpr EnableIf_t< IsBuiltin_v< T >, T > | blaze::conj (T a) noexcept |
Computing the conjugate of the given value/object. More... | |
template<typename T > | |
BLAZE_ALWAYS_INLINE void | blaze::conjugate (T &a) noexcept(IsNumeric_v< T >) |
In-place conjugation of the given value/object. More... | |
template<typename T > | |
BLAZE_ALWAYS_INLINE void | blaze::cswap (T &a, T &b) noexcept(IsNumeric_v< T >) |
Swapping two conjugated values/objects. More... | |
template<typename T > | |
constexpr size_t | blaze::digits (T a) noexcept |
Returns the number of valid digits of an integral value. More... | |
template<bool RF, typename T1 , typename T2 , typename = EnableIf_t< ( IsSigned_v<T1> && IsSigned_v<T2> ) || ( IsUnsigned_v<T1> && IsUnsigned_v<T2> ) >> | |
constexpr bool | blaze::equal (const T1 &a, const T2 &b) |
Generic equality comparison. More... | |
template<typename T1 , typename T2 > | |
constexpr bool | blaze::equal (const T1 &a, const T2 &b) |
Generic equality check. More... | |
template<typename T > | |
BLAZE_ALWAYS_INLINE constexpr EnableIf_t< IsBuiltin_v< T >||IsComplex_v< T >, const T & > | blaze::eval (const T &a) noexcept |
Formal evaluation of the given argument. More... | |
template<typename T > | |
BLAZE_ALWAYS_INLINE constexpr EnableIf_t< IsBuiltin_v< T >||IsComplex_v< T >, T > | blaze::evaluate (const T &a) noexcept |
Formal evaluation of the given argument. More... | |
template<typename T , typename = EnableIf_t< IsBuiltin_v<T> >> | |
decltype(auto) BLAZE_ALWAYS_INLINE | blaze::exp10 (const T &a) noexcept(noexcept(pow(T(10), a))) |
Returns the base-10 exponent of the given built-in value. More... | |
template<typename T1 , typename T2 > | |
BLAZE_ALWAYS_INLINE constexpr bool | blaze::greater (const T1 &a, const T2 &b) noexcept(IsBuiltin_v< CommonType_t< T1, T2 > >) |
Generic greater-than comparison. More... | |
template<typename T , typename = EnableIf_t< IsBuiltin_v<T> >> | |
auto | blaze::invcbrt (T a) noexcept -> decltype(inv(cbrt(a))) |
Returns the inverse cubic root of the given built-in value. More... | |
template<typename T > | |
BLAZE_ALWAYS_INLINE constexpr EnableIf_t< IsIntegral_v< T >, double > | blaze::inv (T a) noexcept |
Inverting the given integral value. More... | |
BLAZE_ALWAYS_INLINE constexpr float | blaze::inv (float a) noexcept |
Inverting the given single precision value. More... | |
BLAZE_ALWAYS_INLINE constexpr double | blaze::inv (double a) noexcept |
Inverting the given double precision value. More... | |
BLAZE_ALWAYS_INLINE constexpr long double | blaze::inv (long double a) noexcept |
Inverting the given extended precision value. More... | |
BLAZE_ALWAYS_INLINE constexpr complex< float > | blaze::inv (const complex< float > &a) noexcept |
Inverting the given single precision complex number. More... | |
BLAZE_ALWAYS_INLINE constexpr complex< double > | blaze::inv (const complex< double > &a) noexcept |
Inverting the given double precision complex number. More... | |
BLAZE_ALWAYS_INLINE constexpr complex< long double > | blaze::inv (const complex< long double > &a) noexcept |
Inverting the given extended precision complex number. More... | |
BLAZE_ALWAYS_INLINE void | blaze::invert (float &a) noexcept |
In-place inversion of the given single precision value. More... | |
BLAZE_ALWAYS_INLINE void | blaze::invert (double &a) noexcept |
In-place inversion of the given double precision value. More... | |
BLAZE_ALWAYS_INLINE void | blaze::invert (long double &a) noexcept |
In-place inversion of the given extended precision value. More... | |
BLAZE_ALWAYS_INLINE void | blaze::invert (complex< float > &a) noexcept |
In-place inversion of the given single precision complex number. More... | |
BLAZE_ALWAYS_INLINE void | blaze::invert (complex< double > &a) noexcept |
In-place inversion of the given double precision complex number. More... | |
BLAZE_ALWAYS_INLINE void | blaze::invert (complex< long double > &a) noexcept |
In-place inversion of the given extended precision complex number. More... | |
template<typename T , typename = EnableIf_t< IsBuiltin_v<T> >> | |
auto | blaze::invsqrt (T a) noexcept -> decltype(inv(sqrt(a))) |
Returns the inverse square root of the given built-in value. More... | |
template<typename T , typename = EnableIf_t< IsBuiltin_v<T> >> | |
auto | blaze::invsqrt (const complex< T > &a) noexcept -> decltype(inv(sqrt(a))) |
Returns the inverse square root of the given complex number. More... | |
template<bool RF, typename Type > | |
BLAZE_ALWAYS_INLINE bool | blaze::isDefault (const Type &v) noexcept(IsBuiltin_v< Type >) |
Returns whether the given value/object is in default state. More... | |
template<typename Type > | |
BLAZE_ALWAYS_INLINE bool | blaze::isDefault (const Type &v) noexcept(IsBuiltin_v< Type >) |
Returns whether the given value/object is in default state. More... | |
template<typename Type , typename = EnableIf_t< IsNumeric_v<Type> >> | |
BLAZE_ALWAYS_INLINE bool | blaze::isDivisor (const Type &v) |
Returns whether the given value/object is a valid divisor. More... | |
template<typename T > | |
BLAZE_ALWAYS_INLINE EnableIf_t< IsNumeric_v< T >, bool > | blaze::isnan (T a) noexcept |
Platform independent implementation of the C99 isnan function. More... | |
template<bool RF, typename Type > | |
BLAZE_ALWAYS_INLINE EnableIf_t< IsNumeric_v< Type >, bool > | blaze::isOne (const Type &v) |
Returns whether the given value/object represents the numeric value 1. More... | |
template<typename Type > | |
BLAZE_ALWAYS_INLINE bool | blaze::isOne (const Type &v) |
Returns whether the given value/object represents the numeric value 1. More... | |
template<bool RF, typename Type > | |
BLAZE_ALWAYS_INLINE bool | blaze::isReal (const Type &v) noexcept |
Returns whether the given value/object represents a real number. More... | |
template<typename Type > | |
BLAZE_ALWAYS_INLINE bool | blaze::isReal (const Type &v) noexcept |
Returns whether the given value/object represents a real number. More... | |
template<bool RF, typename Type > | |
BLAZE_ALWAYS_INLINE EnableIf_t< IsNumeric_v< Type >, bool > | blaze::isZero (const Type &v) noexcept |
Returns whether the given value/object represents the numeric value 0. More... | |
template<typename Type > | |
BLAZE_ALWAYS_INLINE bool | blaze::isZero (const Type &v) noexcept |
Returns whether the given value/object represents the numeric value 0. More... | |
template<typename T1 , typename T2 > | |
BLAZE_ALWAYS_INLINE constexpr bool | blaze::less (const T1 &a, const T2 &b) noexcept(IsBuiltin_v< CommonType_t< T1, T2 > >) |
Generic less-than comparison. More... | |
template<typename T > | |
BLAZE_ALWAYS_INLINEdecltype(auto) constexpr | blaze::pow2 (const T &a) noexcept(noexcept(a *a)) |
Squaring the given value/object. More... | |
template<typename T > | |
BLAZE_ALWAYS_INLINEdecltype(auto) constexpr | blaze::pow3 (const T &a) noexcept(noexcept(a *a *a)) |
Cubing the given value/object. More... | |
template<typename T > | |
BLAZE_ALWAYS_INLINEdecltype(auto) constexpr | blaze::pow4 (const T &a) noexcept(noexcept(pow2(pow2(a)))) |
Quadruple the given value/object. More... | |
template<typename T > | |
decltype(auto) BLAZE_ALWAYS_INLINE | blaze::qdrt (const T &a) |
Computing the quad root (4th root) of the given value/object. More... | |
template<typename Type > | |
BLAZE_ALWAYS_INLINE constexpr void | blaze::reset (Type &resettable) |
Resetting the given value/object to the default value. More... | |
template<typename T > | |
BLAZE_ALWAYS_INLINE constexpr EnableIf_t< IsBuiltin_v< T >||IsComplex_v< T >, const T & > | blaze::serial (const T &a) noexcept |
Formal serialization of the evaluation of the given argument. More... | |
template<typename T , typename = EnableIf_t< IsIntegral_v<T> >> | |
constexpr T | blaze::sign (T a) noexcept |
Evaluating the sign of the given value. More... | |
constexpr float | blaze::sign (float a) noexcept |
Evaluating the sign of the given single precision value. More... | |
constexpr double | blaze::sign (double a) noexcept |
Evaluating the sign of the given double precision value. More... | |
constexpr long double | blaze::sign (long double a) noexcept |
Evaluating the sign of the given extended precision value. More... | |
BLAZE_ALWAYS_INLINE constexpr void blaze::clear | ( | Type & | clearable | ) |
Clearing the given value/object to the default state.
clearable | The value/object to be cleared. |
The clear shim represents an abstract interface for clearing a value/object of any given data type to its default state. Values of built-in data type are reset to zero.
|
noexcept |
Computing the conjugate of the given value/object.
a | The given value/object. |
The conj shim represents an abstract interface for the computation of the complex conjugate of any given data type. In case the given value is of complex type the function computes the complex conjugate by reversing the sign of the imaginary part:
Values of other data types, such as all built-in data types, are considered complex numbers with an imaginary part of 0. Thus the returned value corresponds to the given value. For more information on complex conjugates, see
|
noexcept |
In-place conjugation of the given value/object.
a | The given value/object to be conjugated. |
The conjugate shim represents an abstract interface for the in-place conjugation of any given value/object. In case the given value is of complex type the function computes the complex conjugate by reversing the sign of the imaginary part:
Values of other data types, such as all built-in data types, are considered complex numbers with an imaginary part of 0. Thus the returned value corresponds to the given value. For more information on complex conjugates, see
|
noexcept |
Swapping two conjugated values/objects.
a | The first value/object to be swapped and conjugated. |
b | The second value/object to be swapped and conjugated. |
The cswap shim implements the most efficient way to swap and conjugate two values/objects. Semantically cswap is equivalent to the following sequence of operations:
|
inlinenoexcept |
Returns the number of valid digits of an integral value.
a | The integral value. |
This function counts the number of valid digits in the given integral value.
The digits function only works for integral built-in data types. The attempt to use any other type will result in a compile time error.
|
inline |
Generic equality comparison.
a | First value/object. |
b | Second value/object. |
The equal shim represents an abstract interface for testing two values/objects for equality. Based on the setting of the relaxation flag RF, the function either performs a comparison via the equality operator (blaze::strict) or or a special comparison is selected that takes the limited machine accuracy into account (blaze::relaxed). In case the two values/objects are equal, the function returns true, otherwise it returns false.
|
inline |
Generic equality check.
a | First value/object. |
b | Second value/object. |
The equal shim represents an abstract interface for testing two values/objects for equality. In case the two values/objects are equal, the function returns true, otherwise it returns false. Per default, the comparison of the two values/objects uses the equality operator operator==(). For built-in floating point data types a special comparison is selected that takes the limited machine accuracy into account.
|
noexcept |
Formal evaluation of the given argument.
a | The value/object to be evaluated. |
The eval shim represents an abstract interface for enforcing the evaluation of a value/object of any given data type. For data types that don't require an evaluation, as for instance built-in data types, the default behavior is not changed.
|
noexcept |
Formal evaluation of the given argument.
a | The value/object to be evaluated. |
The evaluate shim represents an abstract interface for enforcing the evaluation of a given value/object of any data type and deducing the correct result type of an operation. For data types that don't require an evaluation, as for instance built-in or complex data types, the default behavior is not changed.
|
noexcept |
Returns the base-10 exponent of the given built-in value.
a | The given built-in value. |
|
noexcept |
Generic greater-than comparison.
a | First value. |
b | Second value. |
Generic greater-than comparison between to numeric values. Depending on the types of the two arguments, a special comparison for floating point values is selected that takes the limited machine accuracy into account.
|
noexcept |
Inverting the given integral value.
a | The integral value to be inverted. |
The inv shim represents an abstract interface for inverting a value/object of any given data type. For integral values this results in .
|
noexcept |
Inverting the given single precision value.
a | The single precision value to be inverted. |
The inv shim represents an abstract interface for inverting a value/object of any given data type. For single precision floating point values this results in .
|
noexcept |
Inverting the given double precision value.
a | The double precision value to be inverted. |
The inv shim represents an abstract interface for inverting a value/object of any given data type. For double precision floating point values this results in .
|
noexcept |
Inverting the given extended precision value.
a | The extended precision value to be inverted. |
The inv shim represents an abstract interface for inverting a value/object of any given data type. For extended precision floating point values this results in .
|
noexcept |
Inverting the given single precision complex number.
a | The single precision complex number to be inverted. |
The inv shim represents an abstract interface for inverting a value/object of any given data type. For a single precision floating point complex number this results in
.
|
noexcept |
Inverting the given double precision complex number.
a | The double precision complex number to be inverted. |
The inv shim represents an abstract interface for inverting a value/object of any given data type. For a double precision floating point complex number this results in
.
|
noexcept |
Inverting the given extended precision complex number.
a | The extended precision complex number to be inverted. |
The inv shim represents an abstract interface for inverting a value/object of any given data type. For an extended precision floating point complex number this results in
.
|
inlinenoexcept |
Returns the inverse cubic root of the given built-in value.
a | The given built-in value ![]() |
|
noexcept |
In-place inversion of the given single precision value.
a | The single precision value to be inverted. |
The invert shim represents an abstract interface for inverting a value/object of any given data type in-place. For single precision floating point values this results in .
|
noexcept |
In-place inversion of the given double precision value.
a | The double precision value to be inverted. |
The invert shim represents an abstract interface for inverting a value/object of any given data type in-place. For double precision floating point values this results in .
|
noexcept |
In-place inversion of the given extended precision value.
a | The extended precision value to be inverted. |
The invert shim represents an abstract interface for inverting a value/object of any given data type in-place. For extended precision floating point values this results in .
|
noexcept |
In-place inversion of the given single precision complex number.
a | The single precision complex number to be inverted. |
The invert shim represents an abstract interface for inverting a value/object of any given data type in-place. For a single precision floating point complex number this results in
.
|
noexcept |
In-place inversion of the given double precision complex number.
a | The double precision complex number to be inverted. |
The invert shim represents an abstract interface for inverting a value/object of any given data type in-place. For a double precision floating point complex number this results in
.
|
noexcept |
In-place inversion of the given extended precision complex number.
a | The extended precision complex number to be inverted. |
The invert shim represents an abstract interface for inverting a value/object of any given data type in-place. For an extended precision floating point complex number this results in
.
|
inlinenoexcept |
Returns the inverse square root of the given built-in value.
a | The given built-in value ![]() |
|
inlinenoexcept |
Returns the inverse square root of the given complex number.
a | The given complex number. |
|
noexcept |
Returns whether the given value/object is in default state.
v | The value/object to be tested for its default state. |
The isDefault shim represents an abstract interface for testing a value/object whether it is in its default state or not. In case the value/object is in its default state, the function returns true, otherwise it returns false. For integral built-in data types, the function returns true in case the current value is zero:
For floating point built-in data types, the function by default uses relaxed semantics and returns true in case the current value is close to zero within a certain accuracy:
Optionally, it is possible to switch between relaxed semantics (blaze::relaxed) and strict semantics (blaze::strict). In case of strict semantics, for floating point built-in data types the function returns true in case the current value is exactly zero:
|
noexcept |
Returns whether the given value/object is in default state.
v | The value/object to be tested for its default state. |
The isDefault shim represents an abstract interface for testing a value/object whether it is in its default state or not. In case the value/object is in its default state, the function returns true, otherwise it returns false. For integral built-in data types, the function returns true in case the current value is zero:
For floating point built-in data types, the function by default uses relaxed semantics and returns true in case the current value is close to zero within a certain accuracy:
Optionally, it is possible to switch between relaxed semantics (blaze::relaxed) and strict semantics (blaze::strict). In case of strict semantics, for floating point built-in data types the function returns true in case the current value is exactly zero:
BLAZE_ALWAYS_INLINE bool blaze::isDivisor | ( | const Type & | v | ) |
Returns whether the given value/object is a valid divisor.
v | The value to be tested. |
The isDivisor shim provides an abstract interface for testing a value/object of any type whether it represents a valid divisor. In case the value/object can be used as divisor, the function returns true, otherwise it returns false.
|
noexcept |
Platform independent implementation of the C99 isnan function.
a | Value to be checked. |
This function provides a platform independent check for NaN values. In contrast to the isnan function from the C standard, which is only supporting all floating point types, this function can be used for all numeric data types (i.e. all integral, floating point, and complex data types). The function returns true in case the given value is not a number (NaN). In all other cases the function returns false.
BLAZE_ALWAYS_INLINE EnableIf_t< IsNumeric_v<Type>, bool > blaze::isOne | ( | const Type & | v | ) |
Returns whether the given value/object represents the numeric value 1.
v | The value to be tested. |
The isOne shim provides an abstract interface for testing a value/object of any type whether it represents the numeric value 1. In case the value/object is 1, the function returns true, otherwise it returns false:
For floating point built-in data types, the function by default uses relaxed semantics and returns true in case the current value is close to 1 within a certain accuracy:
Optionally, it is possible to switch between relaxed semantics (blaze::relaxed) and strict semantics (blaze::strict). In case of strict semantics, for floating point built-in data types the function returns true in case the current value is exactly 1:
BLAZE_ALWAYS_INLINE bool blaze::isOne | ( | const Type & | v | ) |
Returns whether the given value/object represents the numeric value 1.
v | The value to be tested. |
The isOne shim provides an abstract interface for testing a value/object of any type whether it represents the numeric value 1. In case the value/object is 1, the function returns true, otherwise it returns false:
For floating point built-in data types, the function by default uses relaxed semantics and returns true in case the current value is close to 1 within a certain accuracy:
Optionally, it is possible to switch between relaxed semantics (blaze::relaxed) and strict semantics (blaze::strict). In case of strict semantics, for floating point built-in data types the function returns true in case the current value is exactly 1:
|
noexcept |
Returns whether the given value/object represents a real number.
v | The value to be tested. |
The isReal shim provides an abstract interface for testing a value/object of any type whether it represents the a real number. In case the value/object is of built-in type, the function returns true:
In case the value/object is of complex type, the function returns true if the imaginary part is close to 0 (relaxed semantics):
Optionally, it is possible to switch between relaxed semantics (blaze::relaxed) and strict semantics (blaze::strict). In case of strict semantics, for complex types the function returns true in case the imaginary part is exactly zero:
For all other types the function returns false.
|
noexcept |
Returns whether the given value/object represents a real number.
v | The value to be tested. |
The isReal shim provides an abstract interface for testing a value/object of any type whether it represents the a real number. In case the value/object is of built-in type, the function returns true. In case the value/object is of complex type, the function returns true if the imaginary part is equal to 0. Otherwise it returns false.
|
noexcept |
Returns whether the given value/object represents the numeric value 0.
v | The value to be tested. |
The isZero shim provides an abstract interface for testing a value/object of any type whether it represents the numeric value 0. In case the value/object is 0, the function returns true, otherwise it returns false:
For floating point built-in data types, the function by default uses relaxed semantics and returns true in case the current value is close to zero within a certain accuracy:
Optionally, it is possible to switch between relaxed semantics (blaze::relaxed) and strict semantics (blaze::strict). In case of strict semantics, for floating point built-in data types the function returns true in case the current value is exactly zero:
|
noexcept |
Returns whether the given value/object represents the numeric value 0.
v | The value to be tested. |
The isZero shim provides an abstract interface for testing a value/object of any type whether it represents the numeric value 0. In case the value/object is 0, the function returns true, otherwise it returns false:
For floating point built-in data types, the function by default uses relaxed semantics and returns true in case the current value is close to zero within a certain accuracy:
Optionally, it is possible to switch between relaxed semantics (blaze::relaxed) and strict semantics (blaze::strict). In case of strict semantics, for floating point built-in data types the function returns true in case the current value is exactly zero:
|
noexcept |
Generic less-than comparison.
a | First value. |
b | Second value. |
Generic less-than comparison between to numeric values. Depending on the types of the two arguments, a special comparison for floating point values is selected that takes the limited machine accuracy into account.
|
noexcept |
Squaring the given value/object.
a | The value/object to be squared. |
The pow2 shim represents an abstract interface for squaring a value/object of any given data type. For values of built-in data type this results in a plain multiplication.
|
noexcept |
Cubing the given value/object.
a | The value/object to be cubed. |
The pow3 shim represents an abstract interface for cubing a value/object of any given data type. For values of built-in data type this results in a plain multiplication.
|
noexcept |
Quadruple the given value/object.
a | The value/object to be quadrupled. |
The pow4 shim represents an abstract interface for quadrupling a value/object of any given data type. For values of built-in data type this results in a plain multiplication.
decltype(auto) BLAZE_ALWAYS_INLINE blaze::qdrt | ( | const T & | a | ) |
Computing the quad root (4th root) of the given value/object.
a | The value/object for the computation. |
The qdrt shim represents an abstract interface for computing the quad root (i.e. 4th root) of a value/object of any given data type.
BLAZE_ALWAYS_INLINE constexpr void blaze::reset | ( | Type & | resettable | ) |
Resetting the given value/object to the default value.
resettable | The value/object to be resetted. |
The reset shim represents an abstract interface for the resetting of a value/object of any given data type to its default value. Values of built-in data type are reset to zero.
|
noexcept |
Formal serialization of the evaluation of the given argument.
a | The value/object to be evaluated serially. |
The serial shim represents an abstract interface for the serialization of the evaluation of a value/object of any given data type. For data types that are per default evaluated serially, as for instance built-in data types, the default behavior is not changed.
|
inlinenoexcept |
Evaluating the sign of the given value.
a | The given value. |
The sign function evaluates the sign of the given value a of the built-in data type T. It returns 1 if a is greater than zero, 0 if a is zero, and -1 if a is less than zero.
|
inlinenoexcept |
Evaluating the sign of the given single precision value.
a | The given single precision value. |
The sign function evaluates the sign of the given single precision value a. It returns 1.0 if a is greater than zero, 0.0 if a is zero, -1.0 if a is less than zero, and NaN
if a is NaN
.
|
inlinenoexcept |
Evaluating the sign of the given double precision value.
a | The given double precision value. |
The sign function evaluates the sign of the given double precision value a. It returns 1.0 if a is greater than zero, 0.0 if a is zero, -1.0 if a is less than zero, and NaN
if a is NaN
.
|
inlinenoexcept |
Evaluating the sign of the given extended precision value.
a | The given extended precision value. |
The sign function evaluates the sign of the given extended precision value a. It returns 1.0 if a is greater than zero, 0.0 if a is zero, -1.0 if a is less than zero, and NaN
if a is NaN
.