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 
44 #include <blaze/util/mpl/Minus.h>
45 #include <blaze/util/mpl/Modulus.h>
46 #include <blaze/util/mpl/Plus.h>
48 
49 
50 namespace blaze {
51 
52 //=================================================================================================
53 //
54 // CLASS DEFINITION
55 //
56 //=================================================================================================
57 
58 //*************************************************************************************************
78 template< typename T1 // Type of the first compile time value
79  , typename T2 > // Type of the second compile time value
81  : public Plus< T1, Modulus< Minus< T2, Modulus< T1, T2 > >, T2 > >
82 {
83  //**********************************************************************************************
85  BLAZE_STATIC_ASSERT( T1::value > 0 && T2::value > 0 );
87  //**********************************************************************************************
88 };
89 //*************************************************************************************************
90 
91 } // namespace blaze
92 
93 #endif
Header file for the Modulus class template.
Header file for the Plus 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.
Header file for the IntegralConstant 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:112
Compile time integral round up operation.The NextMultiple class template rounds up the given template...
Definition: NextMultiple.h:80