Class SmallMapObj#
Defined in File map.h
Inheritance Relationships#
Base Types#
public tvm::ffi::MapObj
(Class MapObj)public tvm::ffi::details::InplaceArrayBase< SmallMapObj, MapObj::KVRawStorageType >
Class Documentation#
-
class SmallMapObj : public tvm::ffi::MapObj, public tvm::ffi::details::InplaceArrayBase<SmallMapObj, MapObj::KVRawStorageType>#
A specialization of small-sized hash map.
Public Functions
-
inline uint64_t NumSlots() const#
Return the number of usable slots for Small layout (mask off tag).
- Returns:
The number of usable slots
-
inline ~SmallMapObj()#
-
inline size_t count(const key_type &key) const#
Count the number of times a key exists in the SmallMapObj.
- Parameters:
key – The indexing key
- Returns:
The result, 0 or 1
-
inline const mapped_type &at(const key_type &key) const#
Index value associated with a key, throw exception if the key does not exist.
- Parameters:
key – The indexing key
- Returns:
The const reference to the value
-
inline mapped_type &at(const key_type &key)#
Index value associated with a key, throw exception if the key does not exist.
- Parameters:
key – The indexing key
- Returns:
The mutable reference to the value
-
inline iterator begin() const#
- Returns:
begin iterator
-
inline iterator end() const#
- Returns:
end iterator
-
inline iterator find(const key_type &key) const#
Index value associated with a key.
- Parameters:
key – The indexing key
- Returns:
The iterator of the entry associated with the key, end iterator if not exists
-
inline void erase(const iterator &position)#
Erase the entry associated with the iterator.
- Parameters:
position – The iterator
Friends
- friend class MapObj
- friend class DenseMapObj
-
inline uint64_t NumSlots() const#