|
Harlinn.Windows 0.1
|
A tuple holding two numbers. More...
#include <VectorMath.h>
Public Types | |
| using | DerivedType = DerivedT |
| using | value_type = T |
| using | size_type = size_t |
| using | ValueType = value_type |
| using | SizeType = size_type |
| using | Traits = SIMD::Traits<value_type, Size> |
| using | SIMDType = typename Traits::SIMDType |
| using | ArrayType = typename Traits::ArrayType |
| using | reference = typename ArrayType::reference |
| using | const_reference = typename ArrayType::const_reference |
| using | pointer = typename ArrayType::pointer |
| using | const_pointer = typename ArrayType::const_pointer |
| using | iterator = typename ArrayType::iterator |
| using | const_iterator = typename ArrayType::const_iterator |
| using | reverse_iterator = typename ArrayType::reverse_iterator |
| using | const_reverse_iterator = typename ArrayType::const_reverse_iterator |
| using | Simd = TupleSimd<DerivedType> |
| The mathematical operations are performed using this type which holds a SIMD vector. | |
Public Member Functions | |
| Tuple2 () noexcept | |
| Tuple2 (value_type v) noexcept | |
| Tuple2 (value_type xv, value_type yv) noexcept | |
| Tuple2 (const ArrayType a) noexcept | |
| template<SimdType U> requires std::is_same_v<Traits, typename U::Traits> | |
| Tuple2 (const U &other) noexcept | |
| template<TupleType U> requires std::is_same_v<Traits, typename U::Traits> | |
| Tuple2 (const U &other) noexcept | |
| template<TupleType U> requires ( std::is_same_v<Traits, typename U::Traits> == false ) | |
| Tuple2 (const U &other) noexcept | |
| template<SimdType U> requires std::is_same_v<Traits, typename U::Traits> | |
| DerivedType & | operator= (const U &other) noexcept |
| Simd | ToSimd () const noexcept |
| operator Simd () const noexcept | |
| template<TupleType U> requires ( U::Size == Size ) | |
| constexpr bool | operator== (const U &other) const noexcept |
| template<TupleType U> requires ( U::Size == Size ) | |
| constexpr bool | operator!= (const U &other) const noexcept |
| constexpr bool | operator== (value_type value) const noexcept |
| constexpr bool | operator!= (value_type value) const noexcept |
| template<SimdType U> requires std::is_same_v<Traits, typename U::Traits> | |
| bool | operator== (const U &other) const noexcept |
| template<SimdType U> requires std::is_same_v<Traits, typename U::Traits> | |
| bool | operator!= (const U &other) const noexcept |
| Simd | operator- () const noexcept |
| DerivedType & | operator+= (const Simd &other) noexcept |
| template<TupleType U> requires ( U::Size == Size ) | |
| DerivedType & | operator+= (const U &other) noexcept |
| DerivedType & | operator+= (const value_type value) noexcept |
| DerivedType & | operator-= (const Simd &other) noexcept |
| template<TupleType U> requires ( U::Size == Size ) | |
| DerivedType & | operator-= (const U &other) noexcept |
| DerivedType & | operator-= (const value_type value) noexcept |
| DerivedType & | operator*= (const Simd &other) noexcept |
| template<TupleType U> requires ( U::Size == Size ) | |
| DerivedType & | operator*= (const U &other) noexcept |
| DerivedType & | operator*= (const value_type value) noexcept |
| DerivedType & | operator/= (const Simd &other) noexcept |
| template<TupleType U> requires ( U::Size == Size ) | |
| DerivedType & | operator/= (const U &other) noexcept |
| DerivedType & | operator/= (const value_type value) noexcept |
| const_reference | operator[] (size_t index) const noexcept |
| reference | operator[] (size_t index) noexcept |
| const_pointer | data () const noexcept |
| pointer | data () noexcept |
| constexpr size_t | size () const noexcept |
| const_reference | front () const noexcept |
| reference | front () noexcept |
| const_reference | back () const noexcept |
| reference | back () noexcept |
| const_iterator | begin () const noexcept |
| const_iterator | cbegin () const noexcept |
| iterator | begin () noexcept |
| const_iterator | end () const noexcept |
| const_iterator | cend () const noexcept |
| iterator | end () noexcept |
| const_reverse_iterator | rbegin () const noexcept |
| reverse_iterator | rbegin () noexcept |
| const_reverse_iterator | rend () const noexcept |
| reverse_iterator | rend () noexcept |
| void | Assign (value_type xv, value_type yv) noexcept |
| void | Assign (const ArrayType &src) noexcept |
| void | Assign (SIMDType src) noexcept |
| bool | HasNaN () const noexcept |
| bool | IsFinite () const noexcept |
| bool | IsInfinite () const noexcept |
| std::string | ToString () const |
Static Public Member Functions | |
| static DerivedType | Zero () |
| static DerivedType | One () |
| static DerivedType | UnitX () |
| static DerivedType | UnitY () |
Public Attributes | ||
| union { | ||
| ArrayType values | ||
| struct { | ||
| value_type x | ||
| value_type y | ||
| } | ||
| }; | ||
Static Public Attributes | |
| static constexpr size_type | Size = 2 |
A tuple holding two numbers.
| DerivedT | A concrete type derived from this template. |
| T | The type of the values. |
This implementation passes Tuple2 derived objects by reference, since passing the Tuple2 derived objects by value did not make a noticeable difference on the performance of pbrto. This is also true for Tuple3 derived objects. Passing Tuple4 derived by value degraded the performance of pbrto by approximately 5 %.
| using Harlinn::Math::Tuple2< DerivedT, T >::ArrayType = typename Traits::ArrayType |
| using Harlinn::Math::Tuple2< DerivedT, T >::const_iterator = typename ArrayType::const_iterator |
| using Harlinn::Math::Tuple2< DerivedT, T >::const_pointer = typename ArrayType::const_pointer |
| using Harlinn::Math::Tuple2< DerivedT, T >::const_reference = typename ArrayType::const_reference |
| using Harlinn::Math::Tuple2< DerivedT, T >::const_reverse_iterator = typename ArrayType::const_reverse_iterator |
| using Harlinn::Math::Tuple2< DerivedT, T >::DerivedType = DerivedT |
| using Harlinn::Math::Tuple2< DerivedT, T >::iterator = typename ArrayType::iterator |
| using Harlinn::Math::Tuple2< DerivedT, T >::pointer = typename ArrayType::pointer |
| using Harlinn::Math::Tuple2< DerivedT, T >::reference = typename ArrayType::reference |
| using Harlinn::Math::Tuple2< DerivedT, T >::reverse_iterator = typename ArrayType::reverse_iterator |
| using Harlinn::Math::Tuple2< DerivedT, T >::Simd = TupleSimd<DerivedType> |
The mathematical operations are performed using this type which holds a SIMD vector.
| using Harlinn::Math::Tuple2< DerivedT, T >::SIMDType = typename Traits::SIMDType |
| using Harlinn::Math::Tuple2< DerivedT, T >::size_type = size_t |
| using Harlinn::Math::Tuple2< DerivedT, T >::SizeType = size_type |
| using Harlinn::Math::Tuple2< DerivedT, T >::Traits = SIMD::Traits<value_type, Size> |
| using Harlinn::Math::Tuple2< DerivedT, T >::value_type = T |
| using Harlinn::Math::Tuple2< DerivedT, T >::ValueType = value_type |
|
inlinenoexcept |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinestatic |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| union { ... } Harlinn::Math::Tuple2< DerivedT, T > |
|
staticconstexpr |
| ArrayType Harlinn::Math::Tuple2< DerivedT, T >::values |
| value_type Harlinn::Math::Tuple2< DerivedT, T >::x |
| value_type Harlinn::Math::Tuple2< DerivedT, T >::y |