Scalar is a class used to store a scalar variable that may be different types/precision.
More...
#include <Scalar.h>
|
| template<class TYPE > |
| static constexpr double | getTol () |
| | Get default tolerance.
|
| |
|
| template<class TYPE > |
| void | store (const TYPE &x) |
| |
Scalar is a class used to store a scalar variable that may be different types/precision.
Definition at line 20 of file Scalar.h.
◆ Scalar() [1/4]
◆ Scalar() [2/4]
template<class TYPE >
| AMP::Scalar::Scalar |
( |
const TYPE & |
x | ) |
|
Construct a Scalar value.
Default constructor allowing implicit conversion to double
- Parameters
-
◆ Scalar() [3/4]
| AMP::Scalar::Scalar |
( |
const Scalar & |
| ) |
|
|
default |
◆ Scalar() [4/4]
| AMP::Scalar::Scalar |
( |
Scalar && |
| ) |
|
|
default |
◆ abs()
| Scalar AMP::Scalar::abs |
( |
| ) |
const |
◆ create()
template<class TYPE >
| Scalar AMP::Scalar::create |
( |
const TYPE & |
x | ) |
const |
Construct a Scalar value.
Create a new Scalar with the same implied type as *this
- Parameters
-
◆ get()
Construct a scalar value.
- Parameters
-
| [in] | tol | Tolerance to allow for the conversion (absolute error) |
- Returns
- Returns the scalar value
◆ getTol()
template<class TYPE >
| static constexpr double AMP::Scalar::getTol |
( |
| ) |
|
|
inlinestaticconstexpr |
Get default tolerance.
Definition at line 86 of file Scalar.h.
◆ getTypeHash()
| uint32_t AMP::Scalar::getTypeHash |
( |
| ) |
const |
|
inline |
◆ has_value()
| bool AMP::Scalar::has_value |
( |
| ) |
const |
|
inlinenoexcept |
Check if we are storing a value.
Definition at line 82 of file Scalar.h.
References d_data.
◆ is_complex()
| bool AMP::Scalar::is_complex |
( |
| ) |
const |
|
inline |
Return true if the type is a complex type.
Definition at line 69 of file Scalar.h.
References d_type.
◆ is_floating_point()
| bool AMP::Scalar::is_floating_point |
( |
| ) |
const |
|
inline |
Return true if the type is a floating point type.
Definition at line 63 of file Scalar.h.
References d_type.
◆ is_integral()
| bool AMP::Scalar::is_integral |
( |
| ) |
const |
|
inline |
Return true if the type is a integer point type.
Definition at line 66 of file Scalar.h.
References d_type.
◆ limitsMax()
| Scalar AMP::Scalar::limitsMax |
( |
| ) |
const |
Return the maximum allowed value.
Return the maximum allowed value defined as the maximum value allowed by both the type used to create the scalar and the internal storage limits
◆ limitsMin()
| Scalar AMP::Scalar::limitsMin |
( |
| ) |
const |
Return the minimum allowed value.
Return the minimum allowed value defined as the minimum value allowed by both the type used to create the scalar and the internal storage limits
◆ operator TYPE()
template<class TYPE >
| AMP::Scalar::operator TYPE |
( |
| ) |
const |
|
inlineexplicit |
◆ operator!=()
| bool AMP::Scalar::operator!= |
( |
const Scalar & |
rhs | ) |
const |
◆ operator<()
| bool AMP::Scalar::operator< |
( |
const Scalar & |
rhs | ) |
const |
◆ operator<=()
| bool AMP::Scalar::operator<= |
( |
const Scalar & |
rhs | ) |
const |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ operator==()
| bool AMP::Scalar::operator== |
( |
const Scalar & |
rhs | ) |
const |
◆ operator>()
| bool AMP::Scalar::operator> |
( |
const Scalar & |
rhs | ) |
const |
◆ operator>=()
| bool AMP::Scalar::operator>= |
( |
const Scalar & |
rhs | ) |
const |
◆ print()
| void AMP::Scalar::print |
( |
std::ostream & |
out | ) |
const |
Print the value to a stream.
◆ sqrt()
| Scalar AMP::Scalar::sqrt |
( |
| ) |
const |
◆ store()
template<class TYPE >
| void AMP::Scalar::store |
( |
const TYPE & |
x | ) |
|
|
inlineprivate |
◆ type()
| const auto & AMP::Scalar::type |
( |
| ) |
const |
|
inline |
Return the storage type.
Definition at line 72 of file Scalar.h.
References d_data.
◆ zero()
| Scalar AMP::Scalar::zero |
( |
| ) |
const |
Return a zero.
Return a zero as if it were created by the same type used to create *this
◆ d_data
| std::any AMP::Scalar::d_data |
|
private |
◆ d_hash
| uint32_t AMP::Scalar::d_hash = 0 |
|
private |
◆ d_type
| char AMP::Scalar::d_type = 0 |
|
private |
The documentation for this class was generated from the following file: