17#ifndef __ONERT_UTIL_INDEX_H__
18#define __ONERT_UTIL_INDEX_H__
38template <
typename T,
typename DummyTag>
class Index
41 static const T UNDEFINED = std::numeric_limits<T>::max();
47 explicit Index(
void) : _index{UNDEFINED} {}
53 explicit Index(
const T o) : _index{o} {}
127 bool valid()
const {
return _index != UNDEFINED; }
148 static T
max() {
return UNDEFINED - 1; }
162 size_t operator()(const ::onert::util::Index<T, Tag> &index)
const noexcept
164 return hash<T>()(
index.value());
A wrapper class for unsigned integral Index NOTE : Max value of the underlying type is used as the in...
Index(void)
Construct a new Index object.
bool undefined() const
Check whether the value is undefined.
bool operator!=(const Index &o) const
Inquality operator.
Index & operator=(const Index &o)=default
Copy assignment operator.
Index operator++(int)
Post increment operator.
Index(const T o)
Construct a new Index object with a value in the underlying type.
bool operator<(const Index &I) const
bool operator==(const Index &o) const
Equality operator.
bool valid() const
Check whether the value is valid or not.
Index & operator=(const T o)
Assign a value in the underlying time.
static T max()
Return max index value.
T value() const
Return underlying value.
bool operator==(T o) const
Equality operator.
Index(const Index &o)=default
Copy Constructor.
bool operator!=(T o) const
Inquality operator.
loco::GraphInputIndex index(const TFPlaceholder *node)