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

Refactor SparseMatrixMsg to use automated registration #3832

Merged

Conversation

jeremiah-corrado
Copy link
Contributor

@jeremiah-corrado jeremiah-corrado commented Oct 9, 2024

Refactor SparseMatrixMsg to use instantiateAndRegister.

Related changes to Sparse code:

  • rename layout enum to Layout
  • add SparseSymEntry support to st.insert
  • simplify SparseSymEntry's initializer

Improvements to function registration:

  • add support for generic enum params (useful for Layout enum)
  • add support for auto-generating argument-parsing code for any class that inherits from AbstractSymEntry
    • if the class is generic (like SparseSymEntry), each of its generic fields must have corresponding fields in the config file
  • add support for auto-generating response code for procedures that return classes that inherit from AbstractSymEntry

…or param enums to instantiateAndRegister. Rename 'layout' to 'Layout'. Simplify SparseSymEntry initializer.

Signed-off-by: Jeremiah Corrado <[email protected]>
Signed-off-by: Jeremiah Corrado <[email protected]>
…ay SymEntry class. Generic fields are populated using a parameter class in the config file with the same name, and same field names

Signed-off-by: Jeremiah Corrado <[email protected]>
Signed-off-by: Jeremiah Corrado <[email protected]>
…erit from AbstractSymEntry) to registerCommand

Signed-off-by: Jeremiah Corrado <[email protected]>
@jeremiah-corrado jeremiah-corrado marked this pull request as ready for review October 10, 2024 18:54
Copy link
Member

@stress-tess stress-tess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great! thanks jeremiah!

@stress-tess stress-tess added this pull request to the merge queue Oct 11, 2024
Merged via the queue into Bears-R-Us:master with commit 275b5b3 Oct 11, 2024
11 checks passed
Copy link
Contributor

@ShreyasKhandekar ShreyasKhandekar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little late to the party, but the changes on the sparse side look good to me :)

@jeremiah-corrado jeremiah-corrado deleted the refactor-sparse-matrix branch October 11, 2024 18:58
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

Successfully merging this pull request may close these issues.

4 participants