VecVecDivExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_CONSTRAINTS_VECVECDIVEXPR_H_
36 #define _BLAZE_MATH_CONSTRAINTS_VECVECDIVEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
47 #include <blaze/util/mpl/And.h>
48 #include <blaze/util/mpl/Equal.h>
49 #include <blaze/util/mpl/Not.h>
50 #include <blaze/util/mpl/Or.h>
51 #include <blaze/util/mpl/SizeT.h>
52 
53 
54 namespace blaze {
55 
56 //=================================================================================================
57 //
58 // MUST_BE_VECVECDIVEXPR_TYPE CONSTRAINT
59 //
60 //=================================================================================================
61 
62 //*************************************************************************************************
69 #define BLAZE_CONSTRAINT_MUST_BE_VECVECDIVEXPR_TYPE(T) \
70  static_assert( ::blaze::IsVecVecDivExpr<T>::value, "Non-vector/vector division expression type detected" )
71 //*************************************************************************************************
72 
73 
74 
75 
76 //=================================================================================================
77 //
78 // MUST_NOT_BE_VECVECDIVEXPR_TYPE CONSTRAINT
79 //
80 //=================================================================================================
81 
82 //*************************************************************************************************
89 #define BLAZE_CONSTRAINT_MUST_NOT_BE_VECVECDIVEXPR_TYPE(T) \
90  static_assert( !::blaze::IsVecVecDivExpr<T>::value, "Vector/vector division expression type detected" )
91 //*************************************************************************************************
92 
93 
94 
95 
96 //=================================================================================================
97 //
98 // MUST_FORM_VALID_VECVECDIVEXPR CONSTRAINT
99 //
100 //=================================================================================================
101 
102 //*************************************************************************************************
109 #define BLAZE_CONSTRAINT_MUST_FORM_VALID_VECVECDIVEXPR(T1,T2) \
110  static_assert( ::blaze::And< ::blaze::Or< ::blaze::And< ::blaze::IsRowVector<T1> \
111  , ::blaze::IsRowVector<T2> > \
112  , ::blaze::And< ::blaze::IsColumnVector<T1> \
113  , ::blaze::IsColumnVector<T2> > > \
114  , ::blaze::Or< ::blaze::Equal< ::blaze::Size<T1>, ::blaze::SizeT<0UL> > \
115  , ::blaze::Equal< ::blaze::Size<T2>, ::blaze::SizeT<0UL> > \
116  , ::blaze::Equal< ::blaze::Size<T1>, ::blaze::Size<T2> > > \
117  >::value, "Invalid vector/vector division expression detected" )
118 //*************************************************************************************************
119 
120 
121 
122 
123 //=================================================================================================
124 //
125 // MUST_NOT_FORM_VALID_VECVECDIVEXPR CONSTRAINT
126 //
127 //=================================================================================================
128 
129 //*************************************************************************************************
136 #define BLAZE_CONSTRAINT_MUST_NOT_FORM_VALID_VECVECDIVEXPR(T1,T2) \
137  static_assert( ::blaze::Not< ::blaze::And< ::blaze::Or< ::blaze::And< ::blaze::IsRowVector<T1> \
138  , ::blaze::IsRowVector<T2> > \
139  , ::blaze::And< ::blaze::IsColumnVector<T1> \
140  , ::blaze::IsColumnVector<T2> > > \
141  , ::blaze::Or< ::blaze::Equal< ::blaze::Size<T1>, ::blaze::SizeT<0UL> > \
142  , ::blaze::Equal< ::blaze::Size<T2>, ::blaze::SizeT<0UL> > \
143  , ::blaze::Equal< ::blaze::Size<T1>, ::blaze::Size<T2> > > > \
144  >::value, "Valid vector/vector division expression detected" )
145 //*************************************************************************************************
146 
147 } // namespace blaze
148 
149 #endif
Header file for the IsRowVector type trait.
Header file for the And class template.
Header file for the SizeT class template.
Header file for the IsVecVecDivExpr type trait class.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the Or class template.
Header file for the Not class template.
Header file for the IsColumnVector type trait.
Header file for the Size type trait.
Header file for the Equal class template.