tvm
Public Member Functions | Friends | List of all members
tvm::AttrRegistryMapContainerMap< KeyType > Class Template Reference

Generic attribute map. More...

#include <attr_registry_map.h>

Collaboration diagram for tvm::AttrRegistryMapContainerMap< KeyType >:

Public Member Functions

int count (const KeyType &key) const
 Check if the map has key. More...
 
const runtime::TVMRetValueoperator[] (const KeyType &key) const
 get the corresponding value element at key. More...
 
template<typename ValueType >
ValueType get (const KeyType &key, ValueType def_value) const
 get the corresponding value element at key with default value. More...
 

Friends

template<typename , typename >
class AttrRegistry
 
class OpRegEntry
 

Detailed Description

template<typename KeyType>
class tvm::AttrRegistryMapContainerMap< KeyType >

Generic attribute map.

Template Parameters
KeyTypethe type of the key.

Member Function Documentation

◆ count()

template<typename KeyType >
int tvm::AttrRegistryMapContainerMap< KeyType >::count ( const KeyType &  key) const
inline

Check if the map has key.

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

◆ get()

template<typename KeyType >
template<typename ValueType >
ValueType tvm::AttrRegistryMapContainerMap< KeyType >::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.
Template Parameters
ValueTypeThe content value type.

◆ operator[]()

template<typename KeyType >
const runtime::TVMRetValue& tvm::AttrRegistryMapContainerMap< KeyType >::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.

Friends And Related Function Documentation

◆ AttrRegistry

template<typename KeyType >
template<typename , typename >
friend class AttrRegistry
friend

◆ OpRegEntry

template<typename KeyType >
friend class OpRegEntry
friend

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