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 getindex for ConduitNode #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add getindex for ConduitNode #14

wants to merge 1 commit into from

Conversation

benegee
Copy link
Collaborator

@benegee benegee commented Dec 4, 2024

This adds getindex for ConduitNode.
Although not required for using the interface it makes testing easier.

@benegee benegee changed the title add getindex for ConduitNode dd getindex for ConduitNode Dec 4, 2024
@benegee benegee changed the title dd getindex for ConduitNode Add getindex for ConduitNode Dec 4, 2024
@benegee
Copy link
Collaborator Author

benegee commented Dec 6, 2024

Implementing this was not straightforward as you have to use the method for the correct data type, which you first have to look up. I now create a symbol from the name of the C datatype and pass this to an internal method as another argument to be able to dispatch on it.
It works but I am a bit unsure about this approach.
@sloede @s6nistam

@sloede
Copy link
Member

sloede commented Dec 6, 2024

It works but I am a bit unsure about this approach.

Me too. Maybe you can ping Valentin and ask him if he knows of a better approach for what you are trying to achieve? Adding some context would be helpful as well.

@charleskawczynski
Copy link
Collaborator

I think we may have something similar in ClimaCore (the DataLayouts module)

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