|
template<typename Type > |
void | blaze::clear (Type &clearable) |
| Clearing the given value/object to the default state. More...
|
|
template<typename T1 , typename T2 > |
bool | blaze::equal (const T1 &a, const T2 &b) |
| Generic equality check. More...
|
|
float | blaze::inv (float a) |
| Inverting the given single precision value. More...
|
|
double | blaze::inv (double a) |
| Inverting the given double precision value. More...
|
|
long double | blaze::inv (long double a) |
| Inverting the given long double value. More...
|
|
template<typename Type > |
bool | blaze::isDefault (const Type &v) |
| Returns whether the given value/object is in default state. More...
|
|
template<typename T > |
EnableIf< IsFloatingPoint< T >
, bool >::Type | blaze::isnan (T a) |
| Platform independent implementation of the C99 isnan function. More...
|
|
template<typename Type > |
void | blaze::reset (Type &resettable) |
| Resetting the given value/object to the default value. More...
|
|
template<typename T > |
const MultExprTrait< T, T >::Type | blaze::sq (const T &a) |
| Squaring the given value/object. More...
|
|
template<typename T1 , typename T2 >
bool blaze::equal |
( |
const T1 & |
a, |
|
|
const T2 & |
b |
|
) |
| |
|
inline |
Generic equality check.
- Parameters
-
a | First value/object. |
b | Second value/object. |
- Returns
- true if the two values/objects are equal, false if not.
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.
template<typename Type >
bool blaze::isDefault |
( |
const Type & |
v | ) |
|
|
inline |
Returns whether the given value/object is in default state.
- Parameters
-
v | The value/object to be tested for its default state. |
- Returns
- true in case the given value/object is in its default state, false otherwise.
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 built-in data types, the function returns true in case the current value is zero.
const int i = 0;
double d = 2.0;
template<typename T >
EnableIf< IsFloatingPoint<T>, bool >::Type blaze::isnan |
( |
T |
a | ) |
|
|
inline |
Platform independent implementation of the C99 isnan function.
- Parameters
-
a | Floating point value to be checked. |
- Returns
- Non-zero value if a is a not a number (NaN).
This function provides a platform independent check for NaN values since some compilers don't support the isnan function (although is is part of the latest C standard library).
Note: Since NaN values are only defined for floating point types, this isnan can only be used for floating point types. The attempt to use this function for an integral data type results in a compile time error.