Template representing any scalar types (such as arbb::f32). More...

Public Member Functions | |
| scalar () | |
| Default constructor. | |
| ~scalar () | |
| Destructor. | |
| scalar (const scalar &other) | |
| Copy constructor. | |
| scalar (const typename uncaptured< scalar >::type &data) | |
Constructs a scalar whose value is initialized to data. | |
| template<arbb_scalar_type_t other_scalar_type> | |
| scalar (const scalar< other_scalar_type > &other) | |
| Conversion constructor. | |
| scalar & | operator= (const scalar &other) |
| Assignment operator. | |
| scalar & | operator= (const typename uncaptured< scalar >::type &data) |
Sets this scalar to data. | |
| template<arbb_scalar_type_t other_scalar_type> | |
| scalar & | operator= (const scalar< other_scalar_type > &other) |
| Conversion assignment operator. | |
| std::string | name () const |
Template representing any scalar types (such as arbb::f32).
Instantiations of this template are considered captured scalar types, because operations on them are captured as part of a closure definition (see Function Invocation, Closures). The template parameter scalar_type is one of the arbb_scalar_type_t enumeration values (see Types). Normally, you should not use this template directly in your code. Use one of the predefined type definitions (such as arbb::f32) or the arbb::captured type trait (for example, arbb::captured<float>::type) instead.
Definition at line 45 of file scalar.hpp.
| arbb::scalar< scalar_type >::scalar | ( | ) |
Default constructor.
Implicitly initializes the scalar to a zero value upon construction.
| arbb::scalar< scalar_type >::~scalar | ( | ) |
Destructor.
| arbb::scalar< scalar_type >::scalar | ( | const scalar< scalar_type > & | other | ) |
Copy constructor.
Constructs a scalar with the same value as other.
| arbb::scalar< scalar_type >::scalar | ( | const typename uncaptured< scalar< scalar_type > >::type & | data | ) |
Constructs a scalar whose value is initialized to data.
| arbb::scalar< scalar_type >::scalar | ( | const scalar< other_scalar_type > & | other | ) |
Conversion constructor.
Constructs a scalar with the value of other converted to this type. The following code example calls this constructor:
arbb::i32 a = arbb::f32(1.1); assert(1 == arbb::value(a));
| scalar& arbb::scalar< scalar_type >::operator= | ( | const scalar< scalar_type > & | other | ) |
Assignment operator.
Sets this scalar to the same value as other.
| scalar& arbb::scalar< scalar_type >::operator= | ( | const typename uncaptured< scalar< scalar_type > >::type & | data | ) |
Sets this scalar to data.
| scalar& arbb::scalar< scalar_type >::operator= | ( | const scalar< other_scalar_type > & | other | ) |
Conversion assignment operator.
Sets this scalar to the value of other converted to this type. The following code example calls this operator:
arbb::i32 a; a = arbb::f32(1.1); assert(1 == arbb::value(a));
| std::string arbb::scalar< scalar_type >::name | ( | ) | const [inline] |
Definition at line 90 of file scalar.hpp.
Copyright © 2010-2011, Intel Corporation. All rights reserved.