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

Add format_matrix_subscript_accessor and update_template_data to CodegenConfig #186

Closed
wants to merge 2 commits into from
Closed

Add format_matrix_subscript_accessor and update_template_data to CodegenConfig #186

wants to merge 2 commits into from

Conversation

gareth-cross
Copy link
Contributor

This review adds two small methods to CodegenConfig, with the intention of making it easier to support additional languages:

  • format_matrix_subscript_accessor, which formats the accessor for 2D matrices. This is required in some languages where the foo(i, j) syntax is unavailable. In keeping w/ Hayk's comment on format_data_accessor, I put a TODO suggesting this could potentially be moved into the code-printer itself.
  • update_template_data, which allows CodegenConfig subclasses to pass additional fields or functions to the templating engine.

@aaron-skydio
Copy link
Member

I think we'll need to remove the format_matrix_subscript_accessor change from here since it's a duplicate with #190 which makes the other required changes with matrix_is_1d and have this PR just make the update_template_data change

@gareth-cross gareth-cross deleted the add-format-matrix-subscript-accessor branch August 17, 2023 01:40
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.

3 participants