NextMultiple.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_MPL_NEXTMULTIPLE_H_
36 #define _BLAZE_UTIL_MPL_NEXTMULTIPLE_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <boost/typeof/typeof.hpp>
45 #include <blaze/util/mpl/Minus.h>
46 #include <blaze/util/mpl/Modulus.h>
47 #include <blaze/util/mpl/Plus.h>
49 
50 
51 namespace blaze {
52 
53 //=================================================================================================
54 //
55 // CLASS DEFINITION
56 //
57 //=================================================================================================
58 
59 //*************************************************************************************************
79 template< typename T1 // Type of the first compile time value
80  , typename T2 > // Type of the second compile time value
82  : public Plus< T1, Modulus< Minus< T2, Modulus< T1, T2 > >, T2 > >
83 {
84  //**********************************************************************************************
86  BLAZE_STATIC_ASSERT( T1::value > 0 && T2::value > 0 );
88  //**********************************************************************************************
89 };
90 //*************************************************************************************************
91 
92 } // namespace blaze
93 
94 #endif
Header file for the Modulus class template.
Header file for the Plus class template.
Header file for the IntegralC class template.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Compile time assertion.
Compile time integral addition.The Plus class template returns the sum of the two given template argu...
Definition: Plus.h:72
Header file for the Minus class template.
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:143
Compile time integral round up operation.The NextMultiple class template rounds up the given template...
Definition: NextMultiple.h:81