Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
util
valuetraits
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/IntegralConstant.h
>
44
45
46
namespace
blaze {
47
48
//=================================================================================================
49
//
50
// CLASS DEFINITION
51
//
52
//=================================================================================================
53
54
//*************************************************************************************************
76
template
<
size_t
M,
size_t
N >
77
struct
IsMultipleOf
78
:
public
BoolConstant
< M % N == 0UL >
79
{};
80
//*************************************************************************************************
81
82
83
//*************************************************************************************************
88
template
<
size_t
M >
89
struct
IsMultipleOf
<M,0UL>
90
:
public
FalseType
91
{};
93
//*************************************************************************************************
94
95
96
//*************************************************************************************************
101
template
<>
102
struct
IsMultipleOf<0,0>
103
:
public
TrueType
104
{};
106
//*************************************************************************************************
107
108
109
//*************************************************************************************************
122
template
<
size_t
M,
size_t
N >
123
constexpr
bool
IsMultipleOf_v
=
IsMultipleOf<M,N>::value
;
124
//*************************************************************************************************
125
126
}
// namespace blaze
127
128
#endif
IntegralConstant.h
Header file for the IntegralConstant class template.
blaze::FalseType
BoolConstant< false > FalseType
Type/value traits base class.
Definition
IntegralConstant.h:121
blaze::TrueType
BoolConstant< true > TrueType
Type traits base class.
Definition
IntegralConstant.h:132
blaze::BoolConstant
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.
Definition
IntegralConstant.h:110
blaze::IsMultipleOf_v
constexpr bool IsMultipleOf_v
Auxiliary variable template for the IsMultipleOf value trait.
Definition
IsMultipleOf.h:123
blaze::IsMultipleOf
Compile time check for a multiplicative relationship of two integral values.
Definition
IsMultipleOf.h:79
Generated by
1.18.0