13 #ifndef __UT_StringMap_h__
14 #define __UT_StringMap_h__
25 #define UT_STRINGREF_WRAPPER(return_type, name, qualifier) \
26 SYS_FORCE_INLINE return_type name(const UT_StringRef &key) qualifier \
28 return Parent::name(UTmakeUnsafeRef(key)); \
33 #define UT_STRINGREF_WRAPPER_RANGE(iterator_type, name, qualifier) \
34 SYS_FORCE_INLINE std::pair<iterator_type, iterator_type> \
35 name(const UT_StringRef &key) qualifier \
37 return Parent::name(UTmakeUnsafeRef(key)); \
44 template <
typename ITEM_T>
60 return Parent::erase(first, last);
80 template <typename ITEM_T>
93 void erase(const_iterator pos) { Parent::erase(pos); }
96 Parent::erase(first, last);
114 #undef UT_STRINGREF_WRAPPER
115 #undef UT_STRINGREF_WRAPPER_RANGE
void erase(const_iterator pos)
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
Parent::size_type size_type
#define UT_STRINGREF_WRAPPER(return_type, name, qualifier)
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr &out) -> bool
ITEM_T get(const key_type &key, const ITEM_T &defval) const
Parent::iterator iterator
iterator erase(const_iterator first, const_iterator last)
Parent::iterator iterator
Same as UT_StringMap, but keeps the strings in a sorted order.
SYS_FORCE_INLINE const UT_StringHolder & UTmakeUnsafeRef(const UT_StringRef &ref)
Convert a UT_StringRef into a UT_StringHolder that is a shallow reference.
iterator erase(const_iterator pos)
Base::const_iterator const_iterator
void erase(const_iterator first, const_iterator last)
Parent::const_iterator const_iterator
__hostdev__ uint64_t last(uint32_t i) const
Parent::size_type size_type
Base::const_iterator const_iterator
Parent::const_iterator const_iterator
bool contains(const key_type &key) const
Returns true if a value with the key is contained in the map.
#define UT_STRINGREF_WRAPPER_RANGE(iterator_type, name, qualifier)