IsMultipleOf.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_VALUETRAITS_ISMULTIPLEOF_H_
36 #define _BLAZE_UTIL_VALUETRAITS_ISMULTIPLEOF_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/util/FalseType.h>
45 #include <blaze/util/TrueType.h>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // CLASS DEFINITION
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
78 template< size_t M, size_t N >
80  : public BoolConstant< M % N == 0UL >
81 {};
82 //*************************************************************************************************
83 
84 
85 //*************************************************************************************************
90 template< size_t M >
91 struct IsMultipleOf<M,0UL>
92  : public FalseType
93 {};
95 //*************************************************************************************************
96 
97 
98 //*************************************************************************************************
103 template<>
104 struct IsMultipleOf<0,0>
105  : public TrueType
106 {};
108 //*************************************************************************************************
109 
110 
111 //*************************************************************************************************
124 template< size_t M, size_t N >
126 //*************************************************************************************************
127 
128 } // namespace blaze
129 
130 #endif
Header file for the FalseType type/value trait base class.
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
Compile time check for a multiplicative relationship of two integral values.This value trait tests wh...
Definition: IsMultipleOf.h:79
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the IntegralConstant class template.
constexpr bool IsMultipleOf_v
Auxiliary variable template for the IsMultipleOf value trait.The IsMultipleOf_v variable template pro...
Definition: IsMultipleOf.h:125
Header file for the TrueType type/value trait base class.