Columns.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_CONSTRAINTS_COLUMNS_H_
36 #define _BLAZE_MATH_CONSTRAINTS_COLUMNS_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/util/mpl/Equal.h>
45 #include <blaze/util/mpl/Not.h>
46 #include <blaze/util/mpl/Or.h>
48 
49 
50 namespace blaze {
51 
52 //=================================================================================================
53 //
54 // MUST_HAVE_EQUAL_NUMBER_OF_COLUMNS CONSTRAINT
55 //
56 //=================================================================================================
57 
58 //*************************************************************************************************
67 #define BLAZE_CONSTRAINT_MUST_HAVE_EQUAL_NUMBER_OF_COLUMNS(T1,T2) \
68  static_assert( ::blaze::Or< ::blaze::Equal< ::blaze::Columns<T1>, ::blaze::PtrdiffT<-1L> > \
69  , ::blaze::Equal< ::blaze::Columns<T2>, ::blaze::PtrdiffT<-1L> > \
70  , ::blaze::Equal< ::blaze::Columns<T1>, ::blaze::Columns<T2> > \
71  >::value, "Invalid number of columns detected" )
72 //*************************************************************************************************
73 
74 
75 
76 
77 //=================================================================================================
78 //
79 // MUST_NOT_HAVE_EQUAL_NUMBER_OF_COLUMNS CONSTRAINT
80 //
81 //=================================================================================================
82 
83 //*************************************************************************************************
92 #define BLAZE_CONSTRAINT_MUST_NOT_HAVE_EQUAL_NUMBER_OF_COLUMNS(T1,T2) \
93  static_assert( ::blaze::Or< ::blaze::Equal< ::blaze::Columns<T1>, ::blaze::PtrdiffT<-1L> > \
94  , ::blaze::Equal< ::blaze::Columns<T2>, ::blaze::PtrdiffT<-1L> > \
95  , ::blaze::Not< ::blaze::Equal< ::blaze::Columns<T1>, ::blaze::Columns<T2> > > \
96  >::value, "Invalid number of columns detected" )
97 //*************************************************************************************************
98 
99 } // namespace blaze
100 
101 #endif
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the Or class template.
Header file for the Columns type trait.
Header file for the Not class template.
Header file for the PtrdiffT class template.
Header file for the Equal class template.