Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DF] Various improvements in SaveGraph #9145

Closed
2 tasks done
eguiraud opened this issue Oct 20, 2021 · 0 comments · Fixed by #9540
Closed
2 tasks done

[DF] Various improvements in SaveGraph #9145

eguiraud opened this issue Oct 20, 2021 · 0 comments · Fixed by #9540

Comments

@eguiraud
Copy link
Member

eguiraud commented Oct 20, 2021

SaveGraph would benefit from the following improvements:

  • usage of static variables should be removed, in order to make SaveGraph safe to be called concurrently from multiple threads
  • a tutorial should be added, and an example usage should be included in the docs in the reference guide

Additional context

Related old jira tickets:

ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 5, 2022
SaveGraph mainly relied on static structures.
Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph.

Changes do not affect existing test cases.
ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 6, 2022
…roject#9145)

SaveGraph now does not need a static method to update the id of the nodes.
There is no resetting of the id counter to 0 now.

Corresponding tests are updated.
ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 7, 2022
…roject#9145)

SaveGraph now does not need a static method to update the id of the nodes.
There is no resetting of the id counter to 0 now.

Corresponding tests are updated.
ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 7, 2022
SaveGraph mainly relied on static structures.
Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph.

SaveGraph now does not need a static method to update the id of the nodes.
There is no resetting of the id counter to 0 now.

Corresponding tests are updated.

A python tutorial is included.
ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 7, 2022
SaveGraph mainly relied on static structures.
Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph.

SaveGraph now does not need a static method to update the id of the nodes.
There is no resetting of the id counter to 0 now.

Corresponding tests are updated.

A python tutorial is included.
ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 7, 2022
SaveGraph mainly relied on static structures.
Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph.

SaveGraph now does not need a static method to update the id of the nodes.
There is no resetting of the id counter to 0 now.

Corresponding tests are updated.

A python tutorial is included.

Added missing files
ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 7, 2022
SaveGraph mainly relied on static structures.
Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph.

SaveGraph now does not need a static method to update the id of the nodes.
There is no resetting of the id counter to 0 now.

Corresponding tests are updated.

A python tutorial is included.
ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 7, 2022
SaveGraph mainly relied on static structures.
Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph.

SaveGraph now does not need a static method to update the id of the nodes.
There is no resetting of the id counter to 0 now.

Corresponding tests are updated.

A python tutorial is included.
ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 10, 2022
SaveGraph mainly relied on static structures.

Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph.

Get rid of the static id initializer.
The size of the map of visited nodes is used to assign unique ids.
Now, also the action nodes are in the visited map.
The visited map is now only one and has signature std::unordered_map<void *, std::shared_ptr<GraphNode>> - in this manner, different type of nodes can use the same map.

Tests were adapted accordingly.
ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 10, 2022
SaveGraph mainly relied on static structures.

Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph.

Get rid of the static id initializer.
The size of the map of visited nodes is used to assign unique ids.
Now, also the action nodes are in the visited map.
The visited map is now only one and has signature std::unordered_map<void *, std::shared_ptr<GraphNode>> - in this manner, different type of nodes can use the same map.

Tests were adapted accordingly.
ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 11, 2022
SaveGraph mainly relied on static structures.

Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph.

Get rid of the static id initializer.
The size of the map of visited nodes is used to assign unique ids.
Now, also the action nodes are in the visited map.
The visited map is now only one and has signature std::unordered_map<void *, std::shared_ptr<GraphNode>> - in this manner, different type of nodes can use the same map.

Tests were adapted accordingly.
ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 11, 2022
SaveGraph mainly relied on static structures.

Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph.

Get rid of the static id initializer.
The size of the map of visited nodes is used to assign unique ids.
Now, also the action nodes are in the visited map.
The visited map is now only one and has signature std::unordered_map<void *, std::shared_ptr<GraphNode>> - in this manner, different type of nodes can use the same map.

Tests were adapted accordingly.
ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 11, 2022
…ot-project#9145)

SaveGraph mainly relied on static structures.

Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph.

Get rid of the static id initializer.
The size of the map of visited nodes is used to assign unique ids.
Now, also the action nodes are in the visited map.
The visited map is now only one and has signature std::unordered_map<void *, std::shared_ptr<GraphNode>> - in this manner, different type of nodes can use the same map.
Moreover, some friend methods are now redundant.

Tests were adapted accordingly.
ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 11, 2022
…ot-project#9145)

SaveGraph mainly relied on static structures.

Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph.

Get rid of the static id initializer.
The size of the map of visited nodes is used to assign unique ids.
Now, also the action nodes are in the visited map.
The visited map is now only one and has signature std::unordered_map<void *, std::shared_ptr<GraphNode>> - in this manner, different type of nodes can use the same map.
Moreover, some friend methods are now redundant.

Tests were adapted accordingly.

[DF] Fixed SaveGraph Tutorials
ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 12, 2022
…ot-project#9145)

Removed the static GraphNode id initializer (relevant for SaveGraph).

Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph. The visited map is now only one and has signature std::unordered_map<void *, std::shared_ptr<GraphNode>> - in this manner, different type of nodes can use the same map.

The size of the map of visited nodes is used to assign unique ids. Now, also the action nodes are in the visited map.

Moreover, some friend methods are now redundant.

Tests were adapted accordingly.
ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 12, 2022
…ot-project#9145)

Removed the static GraphNode id initializer (relevant for SaveGraph).

Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph. The visited map is now only one and has signature std::unordered_map<void *, std::shared_ptr<GraphNode>> - in this manner, different type of nodes can use the same map.

The size of the map of visited nodes is used to assign unique ids. Now, also the action nodes are in the visited map.

Moreover, some friend methods are now redundant.

Tests were adapted accordingly.
ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 12, 2022
…ot-project#9145)

Removed the static GraphNode id initializer (relevant for SaveGraph).

Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph. The visited map is now only one and has signature std::unordered_map<void *, std::shared_ptr<GraphNode>> - in this manner, different type of nodes can use the same map.

The size of the map of visited nodes is used to assign unique ids. Now, also the action nodes are in the visited map.

Moreover, some friend methods are now redundant.

Tests were adapted accordingly.
ikabadzhov added a commit to ikabadzhov/root that referenced this issue Jan 12, 2022
…ot-project#9145)

Removed the static GraphNode id initializer (relevant for SaveGraph).

Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph. The visited map is now only one and has signature std::unordered_map<void *, std::shared_ptr<GraphNode>> - in this manner, different type of nodes can use the same map.

The size of the map of visited nodes is used to assign unique ids. Now, also the actions and the RLoopManager  are in the visited map.

Moreover, some friend methods are now redundant.

Tests were adapted accordingly.
eguiraud pushed a commit that referenced this issue Jan 13, 2022
)

Removed the static GraphNode id initializer (relevant for SaveGraph).

Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph. The visited map is now only one and has signature std::unordered_map<void *, std::shared_ptr<GraphNode>> - in this manner, different type of nodes can use the same map.

The size of the map of visited nodes is used to assign unique ids. Now, also the actions and the RLoopManager  are in the visited map.

Moreover, some friend methods are now redundant.

Tests were adapted accordingly.
rahulgrit pushed a commit to rahulgrit/root that referenced this issue Jan 25, 2022
…ot-project#9145)

Removed the static GraphNode id initializer (relevant for SaveGraph).

Removed static maps, which were used to check if a define/filter/range node were already on the computation graph.
Solution is to pass a (non-static) map, which is created at each call of SaveGraph. The visited map is now only one and has signature std::unordered_map<void *, std::shared_ptr<GraphNode>> - in this manner, different type of nodes can use the same map.

The size of the map of visited nodes is used to assign unique ids. Now, also the actions and the RLoopManager  are in the visited map.

Moreover, some friend methods are now redundant.

Tests were adapted accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment