Public Types | Public Member Functions | Friends
ngraph::EnumMask< T > Class Template Reference

Public Types

typedef std::underlying_type< T >::type value_type
 Make sure the template type is an enum. More...
 

Public Member Functions

constexpr EnumMask ()
 
constexpr EnumMask (const T &enum_value)
 
 EnumMask (const EnumMask &other)
 
 EnumMask (std::initializer_list< T > enum_values)
 
value_type value () const
 
bool is_any_set (const EnumMask &p) const
 Check if any of the input parameter enum bit mask match.
 
bool is_set (const EnumMask &p) const
 Check if all of the input parameter enum bit mask match.
 
bool is_any_clear (const EnumMask &p) const
 Check if any of the input parameter enum bit mask does not match.
 
bool is_clear (const EnumMask &p) const
 Check if all of the input parameter enum bit mask do not match.
 
void set (const EnumMask &p)
 
void clear (const EnumMask &p)
 
void clear_all ()
 
bool operator[] (const EnumMask &p) const
 
bool operator== (const EnumMask &other) const
 
bool operator!= (const EnumMask &other) const
 
EnumMaskoperator= (const EnumMask &other)
 
EnumMaskoperator&= (const EnumMask &other)
 
EnumMaskoperator|= (const EnumMask &other)
 
EnumMask operator& (const EnumMask &other) const
 
EnumMask operator| (const EnumMask &other) const
 

Friends

std::ostream & operator<< (std::ostream &os, const EnumMask &m)
 

Member Typedef Documentation

◆ value_type

template<typename T >
typedef std::underlying_type<T>::type ngraph::EnumMask< T >::value_type

Make sure the template type is an enum.

Extract the underlying type of the enum.

Constructor & Destructor Documentation

◆ EnumMask()

template<typename T >
constexpr ngraph::EnumMask< T >::EnumMask ( )
inlineconstexpr

Some bit operations are not safe for signed values, we require enum type to use unsigned underlying type.


The documentation for this class was generated from the following file: