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

Remove Smart Pointer for Network object. #14

Open
var-nan opened this issue Jan 9, 2025 · 0 comments
Open

Remove Smart Pointer for Network object. #14

var-nan opened this issue Jan 9, 2025 · 0 comments

Comments

@var-nan
Copy link
Owner

var-nan commented Jan 9, 2025

Network object is created typically and passed to the DDSolver object in the main function. Since the network object is destroyed automatically after the main() scope, we can just pass the normal pointer (pointer to const network object) to the DDSolver.

Network pointer is copied multiple times for every cut generation, with an overhead of updating the reference counts. Since the Network object remains constant after its creation, we can use pass const pointer to const Network object to the solver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant