Blaze  3.6
MatMatSubExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_CONSTRAINTS_MATMATSUBEXPR_H_
36 #define _BLAZE_MATH_CONSTRAINTS_MATMATSUBEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // MUST_BE_MATMATSUBEXPR_TYPE CONSTRAINT
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
63 #define BLAZE_CONSTRAINT_MUST_BE_MATMATSUBEXPR_TYPE(T) \
64  static_assert( ::blaze::IsMatMatSubExpr_v<T>, "Non-matrix/matrix subtraction expression type detected" )
65 //*************************************************************************************************
66 
67 
68 
69 
70 //=================================================================================================
71 //
72 // MUST_NOT_BE_MATMATSUBEXPR_TYPE CONSTRAINT
73 //
74 //=================================================================================================
75 
76 //*************************************************************************************************
83 #define BLAZE_CONSTRAINT_MUST_NOT_BE_MATMATSUBEXPR_TYPE(T) \
84  static_assert( !::blaze::IsMatMatSubExpr_v<T>, "Matrix/matrix subtraction expression type detected" )
85 //*************************************************************************************************
86 
87 
88 
89 
90 //=================================================================================================
91 //
92 // MUST_FORM_VALID_MATMATSUBEXPR CONSTRAINT
93 //
94 //=================================================================================================
95 
96 //*************************************************************************************************
103 #define BLAZE_CONSTRAINT_MUST_FORM_VALID_MATMATSUBEXPR(T1,T2) \
104  static_assert( ::blaze::IsMatrix_v<T1> && \
105  ::blaze::IsMatrix_v<T2> && \
106  ( ( ::blaze::Size_v<T1,0UL> == -1L ) || \
107  ( ::blaze::Size_v<T2,0UL> == -1L ) || \
108  ( ::blaze::Size_v<T1,0UL> == ::blaze::Size_v<T2,0UL> ) ) && \
109  ( ( ::blaze::Size_v<T1,1UL> == -1L ) || \
110  ( ::blaze::Size_v<T2,1UL> == -1L ) || \
111  ( ::blaze::Size_v<T1,1UL> == ::blaze::Size_v<T2,1UL> ) ) \
112  , "Invalid matrix/matrix subtraction expression detected" )
113 //*************************************************************************************************
114 
115 } // namespace blaze
116 
117 #endif
Header file for the IsMatrix type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the IsMatMatSubExpr type trait class.
Header file for the Size type trait.