Inheritance diagram for vec_base:

For internal use only.
This class defines all the common member and friend functions for vec, an interface similar to valarray.
| D | Raw vector data type e.g. __vector unsigned int (Altivec) or __m128i (SSE2). | |
| T | Scalar element type e.g. unsigned int. | |
| B | Scalar element type for logical function results e.g. boolean <int>. |
Public Types | |
| typedef B | boolean_type |
| Scalar element type for logical function results. | |
| typedef D | data_type |
| Raw vector data type. | |
| typedef T | value_type |
| Scalar element type. | |
| typedef vec< B, length > | vec_boolean |
| Object vector data type for logical function results. | |
| typedef vec< T, length > | vec_value |
| Object vector data type. This should be the subclass. | |
Public Member Functions | |
| const vec_value | cshift (int i) const |
| Shifts all elements circularly left by i places. | |
| data_type | data () const |
| Gets the raw vector data. | |
| value_type | max () const |
| Gets the maximum element. | |
| value_type | min () const |
| Gets the minium element. | |
| void | operator= (data_type lhs) |
| Assigns the raw data lhs. | |
| value_type | operator[] (std::size_t i) const |
| Gets the element at index i. | |
| reference | operator[] (std::size_t i) |
| Gets a reference to the element at index i. | |
| const vec_value | shift (int i) const |
| Shifts all elements left by i places. | |
| value_type | sum () const |
| Gets the sum of all elements. | |
Computed Assignments | |
| vec_value & | operator &= (const vec_value &lhs) |
| Applies operator&= between the corresponding elements of this and rhs. | |
| vec_value & | operator *= (const vec_value &lhs) |
| Applies operator*= between the corresponding elements of this and rhs. | |
| vec_value & | operator%= (const vec_value &lhs) |
| Applies operator%= between the corresponding elements of this and rhs. | |
| vec_value & | operator+= (const vec_value &lhs) |
| Applies operator+= between the corresponding elements of this and rhs. | |
| vec_value & | operator-= (const vec_value &lhs) |
| Applies operator-= between the corresponding elements of this and rhs. | |
| vec_value & | operator/= (const vec_value &lhs) |
| Applies operator/= between the corresponding elements of this and rhs. | |
| vec_value & | operator<<= (const vec_value &lhs) |
| Applies operator<<= between the corresponding elements of this and rhs. | |
| vec_value & | operator>>= (const vec_value &lhs) |
| Applies operator>>= between the corresponding elements of this and rhs. | |
| vec_value & | operator^= (const vec_value &lhs) |
| Applies operator^= between the corresponding elements of this and rhs. | |
| vec_value & | operator|= (const vec_value &lhs) |
| Applies operator|= between the corresponding elements of this and rhs. | |
Static Public Member Functions | |
| static std::size_t | size () |
| Gets the number of elements. Same as length. | |
Static Public Attributes | |
| static const size_t | length |
| Number of elements. | |
Classes | |
| class | reference |
| Proxy for accessing and changing vec elements. More... | |