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 
55 #include <blaze/util/InvalidType.h>
56 #include <blaze/util/mpl/If.h>
57 #include <blaze/util/mpl/Or.h>
63 
64 
65 namespace blaze {
66 
67 //=================================================================================================
68 //
69 // CLASS DEFINITION
70 //
71 //=================================================================================================
72 
73 //*************************************************************************************************
83 template< typename T1 // Type of the left-hand side cross product operand
84  , typename T2 > // Type of the right-hand side cross product operand
86 {
87  private:
88  //**struct Failure******************************************************************************
90  struct Failure { using Type = INVALID_TYPE; };
92  //**********************************************************************************************
93 
94  //**********************************************************************************************
96  using Tmp = If_< IsVector<T1>
104  , If_< IsDenseVector<T2>
107  , Failure >
109  , If_< IsDenseVector<T1>
110  , If_< IsDenseVector<T2>
113  , If_< IsDenseVector<T2>
116  , Failure > >
117  , Failure >
118  , Failure >;
120  //**********************************************************************************************
121 
122  public:
123  //**********************************************************************************************
125  using Type = typename If_< Or< IsConst<T1>, IsVolatile<T1>, IsReference<T1>
128  , Tmp >::Type;
130  //**********************************************************************************************
131 };
132 //*************************************************************************************************
133 
134 
135 //*************************************************************************************************
148 template< typename T1 // Type of the left-hand side cross product operand
149  , typename T2 > // Type of the right-hand side cross product operand
151 //*************************************************************************************************
152 
153 } // namespace blaze
154 
155 #endif
Evaluation of the expression type of a dense vector/sparse vector cross product.Via this type trait i...
Definition: TDVecTSVecCrossExprTrait.h:77
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:76
Compile time check for volatile data types.The IsVolatile type trait tests whether or not the given t...
Definition: IsVolatile.h:75
Header file for the DVecSVecCrossExprTrait class template.
Evaluation of the expression type of a dense vector/dense vector cross product.Via this type trait it...
Definition: DVecDVecCrossExprTrait.h:76
typename Decay< T >::Type Decay_
Auxiliary alias declaration for the Decay type trait.The Decay_ alias declaration provides a convenie...
Definition: Decay.h:98
Header file for the IsRowVector type trait.
Header file for the TDVecTDVecCrossExprTrait class template.
Header file for the IsVolatile type trait.
Header file for the Decay type trait.
Evaluation of the return type of a cross product expression.Via this type trait it is possible to eva...
Definition: CrossExprTrait.h:85
Header file for the TDVecTSVecCrossExprTrait class template.
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:78
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:77
Header file for the IsConst type trait.
Utility type for generic codes.
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:160
Header file for the IsReference type trait.
Compile time check for constant data types.The IsConst type trait tests whether or not the given temp...
Definition: IsConst.h:75
Header file for the IsDenseVector type trait.
Header file for the TSVecTDVecCrossExprTrait class template.
Evaluation of the expression type of a sparse vector/dense vector cross product.Via this type trait i...
Definition: TSVecTDVecCrossExprTrait.h:77
Header file for the DVecDVecCrossExprTrait class template.
Evaluation of the expression type of a dense vector/dense vector cross product.Via this type trait it...
Definition: TDVecTDVecCrossExprTrait.h:76
Header file for the TSVecTSVecCrossExprTrait class template.
Compile time type check.This class tests whether the given template parameter T is a reference type (...
Definition: IsReference.h:75
typename CrossExprTrait< T1, T2 >::Type CrossExprTrait_
Auxiliary alias declaration for the CrossExprTrait class template.The CrossExprTrait_ alias declarati...
Definition: CrossExprTrait.h:150
Evaluation of the expression type of a sparse vector/sparse vector cross product.Via this type trait ...
Definition: TSVecTSVecCrossExprTrait.h:76
Header file for the IsColumnVector type trait.