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

Make global variables local and dynamically allocated + remove hardcoding #45

Open
alrevuelta opened this issue Jul 14, 2020 · 0 comments

Comments

@alrevuelta
Copy link
Owner

Currently the resolve function stores the node_context in a global statically defined variable. See all_context and _populatedIdx in inference.c.

The main problem is that all_context is hardcoded arbitrarily to 50, which makes a model with more than 50 nodes to fail. This should be allocated dynamically to a n number of nodes.

On top of that, it would be better if the resolve function returns a pointer to a heap node_context, so different node_context can coexist in the same code.

Definition Of Done (DoD):

  • Remove all_context and _populatedIdx.
  • Return a struct from the resolve function. This struct contains the context of all nodes plus some kind of index to keep track of the ones that have been populated (the functionality that _populatedIdx had.
  • Integrate it with the existing code.
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