Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit 42cc4b8

Browse files
authored
add more order to Node, at least a consistent sort order... (#1551)
1 parent 5f40d95 commit 42cc4b8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ngraph/node.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ namespace ngraph
213213
NodeVector get_users() const;
214214

215215
virtual std::shared_ptr<Node> get_default_value() const { return nullptr; }
216+
/// Use instance ids for comparison instead of memory addresses to improve determinism
217+
bool operator<(const Node& other) const { return m_instance_id < other.m_instance_id; }
216218
protected:
217219
void set_output_size(size_t n);
218220

0 commit comments

Comments
 (0)