CrossExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_CROSSEXPRTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_CROSSEXPRTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
49 #include <blaze/util/InvalidType.h>
50 #include <blaze/util/mpl/If.h>
51 #include <blaze/util/mpl/Or.h>
58 
59 
60 namespace blaze {
61 
62 //=================================================================================================
63 //
64 // CLASS DEFINITION
65 //
66 //=================================================================================================
67 
68 //*************************************************************************************************
78 template< typename T1 // Type of the left-hand side cross product operand
79  , typename T2 > // Type of the right-hand side cross product operand
81 {
82  private:
83  //**struct Failure******************************************************************************
85  struct Failure { typedef INVALID_TYPE Type; };
87  //**********************************************************************************************
88 
89  //**********************************************************************************************
91  typedef typename If< IsVector<T1>
92  , typename If< IsVector<T2>
93  , typename If< IsColumnVector<T1>
94  , typename If< IsColumnVector<T2>
95  , typename If< IsDenseVector<T1>
96  , typename If< IsDenseVector<T2>
99  >::Type
100  , typename If< IsDenseVector<T2>
103  >::Type
104  >::Type
105  , Failure
106  >::Type
107  , Failure
108  >::Type
109  , Failure
110  >::Type
111  , Failure
112  >::Type Tmp;
113 
114  typedef typename RemoveReference< typename RemoveCV<T1>::Type >::Type Type1;
115  typedef typename RemoveReference< typename RemoveCV<T2>::Type >::Type Type2;
117  //**********************************************************************************************
118 
119  public:
120  //**********************************************************************************************
124  , CrossExprTrait<Type1,Type2>, Tmp >::Type::Type Type;
126  //**********************************************************************************************
127 };
128 //*************************************************************************************************
129 
130 } // namespace blaze
131 
132 #endif
Header file for the SVecDVecCrossExprTrait class template.
Evaluation of the expression type of a sparse vector/sparse vector cross product.Via this type trait ...
Definition: SVecSVecCrossExprTrait.h:77
Compile time type selection.The If class template selects one of the two given types T2 and T3 depend...
Definition: If.h:112
Compile time check for volatile data types.The IsVolatile type trait tests whether or not the given t...
Definition: IsVolatile.h:94
Header file for the DVecSVecCrossExprTrait class template.
Header file for the RemoveCV type trait.
Evaluation of the expression type of a dense vector/dense vector cross product.Via this type trait it...
Definition: DVecDVecCrossExprTrait.h:77
Header file for the IsVolatile type trait.
Evaluation of the return type of a cross product expression.Via this type trait it is possible to eva...
Definition: CrossExprTrait.h:80
Header file for the SVecSVecCrossExprTrait class template.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
Header file for the Or class template.
Header file for the IsVector type trait.
Evaluation of the expression type of a sparse vector/dense vector cross product.Via this type trait i...
Definition: SVecDVecCrossExprTrait.h:79
Header file for the IsNumeric type trait.
Evaluation of the expression type of a dense vector/sparse vector cross product.Via this type trait i...
Definition: DVecSVecCrossExprTrait.h:78
Removal of reference modifiers.The RemoveCV type trait removes any reference modifiers from the given...
Definition: RemoveReference.h:69
Header file for the IsConst type trait.
Utility type for generic codes.
Header file for the IsReference type trait.
Header file for the RemoveReference type trait.
Compile time check for constant data types.The IsConst type trait tests whether or not the given temp...
Definition: IsConst.h:94
Header file for the DVecDVecCrossExprTrait class template.
Compile time type check.This class tests whether the given template parameter T is a reference type (...
Definition: IsReference.h:94
Header file for the IsColumnVector type trait.