tvm
Public Member Functions | Protected Attributes | List of all members
tvm::AttrRegistryMap< KeyType, ValueType > Class Template Reference

Map<Key, ValueType> used to store meta-data. More...

#include <attr_registry_map.h>

Collaboration diagram for tvm::AttrRegistryMap< KeyType, ValueType >:

Public Member Functions

 AttrRegistryMap (const AttrRegistryMapContainerMap< KeyType > &map)
 constructor More...
 
int count (const KeyType &key) const
 Check if the map has op as key. More...
 
ValueType operator[] (const KeyType &key) const
 get the corresponding value element at key. More...
 
ValueType get (const KeyType &key, ValueType def_value) const
 get the corresponding value element at key with default value. More...
 

Protected Attributes

const AttrRegistryMapContainerMap< KeyType > & map_
 The internal map field. More...
 

Detailed Description

template<typename KeyType, typename ValueType>
class tvm::AttrRegistryMap< KeyType, ValueType >

Map<Key, ValueType> used to store meta-data.

Template Parameters
KeyTypeThe type of the key
ValueTypeThe type of the value stored in map.

Constructor & Destructor Documentation

◆ AttrRegistryMap()

template<typename KeyType , typename ValueType >
tvm::AttrRegistryMap< KeyType, ValueType >::AttrRegistryMap ( const AttrRegistryMapContainerMap< KeyType > &  map)
inlineexplicit

constructor

Parameters
mapThe internal map.

Member Function Documentation

◆ count()

template<typename KeyType , typename ValueType >
int tvm::AttrRegistryMap< KeyType, ValueType >::count ( const KeyType &  key) const
inline

Check if the map has op as key.

Parameters
keyThe key to the map
Returns
1 if op is contained in map, 0 otherwise.

◆ get()

template<typename KeyType , typename ValueType >
ValueType tvm::AttrRegistryMap< KeyType, ValueType >::get ( const KeyType &  key,
ValueType  def_value 
) const
inline

get the corresponding value element at key with default value.

Parameters
keyThe key to the map
def_valueThe default value when the key does not exist.
Returns
the const reference to the content value.

◆ operator[]()

template<typename KeyType , typename ValueType >
ValueType tvm::AttrRegistryMap< KeyType, ValueType >::operator[] ( const KeyType &  key) const
inline

get the corresponding value element at key.

Parameters
keyThe key to the map
Returns
the const reference to the content value.

Member Data Documentation

◆ map_

template<typename KeyType , typename ValueType >
const AttrRegistryMapContainerMap<KeyType>& tvm::AttrRegistryMap< KeyType, ValueType >::map_
protected

The internal map field.


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