4 #include <muda/muda_def.h> 8 template <
typename T = u
int64_t>
13 static constexpr
auto invalid_id = std::numeric_limits<value_type>::max();
14 MUDA_GENERIC
explicit IdWithType(value_type value) noexcept
22 MUDA_GENERIC value_type value()
const noexcept {
return m_value; }
23 friend std::ostream& operator<<(std::ostream& os,
const IdWithType&
id)
30 return lhs.m_value == rhs.m_value;
34 return lhs.m_value != rhs.m_value;
38 return lhs.m_value < rhs.m_value;
42 return lhs.m_value > rhs.m_value;
44 MUDA_GENERIC
bool is_valid()
const noexcept
46 return m_value != invalid_id;
50 value_type m_value{invalid_id};
62 struct hash<
muda::IdWithType<T>>
66 return std::hash<T>{}(s.value());
Definition: id_with_type.h:9
Definition: compute_graph_closure_id.h:11