Add void* to tabulate_tensor kernel#749
Closed
sclaus2 wants to merge 11 commits into
Closed
Conversation
This was referenced Feb 21, 2025
added 2 commits
February 22, 2025 01:18
|
|
||
| Returns: | ||
| A Numba signature and a code generation function that returns a void pointer. | ||
| """ # noqa: D205 |
Member
There was a problem hiding this comment.
It should be enough to add a new line after Custom intrinsic to return an empty void* pointer. to drop the noqa
Contributor
Author
There was a problem hiding this comment.
You are right. Done.
mscroggs
approved these changes
Feb 25, 2025
jhale
reviewed
Feb 26, 2025
| def get_void_pointer(typingctx, arr): | ||
| """Custom intrinsic to get a void* pointer from a NumPy array. | ||
|
|
||
| This function takes a NumPy array and returns a void pointer to the array's data. |
Member
There was a problem hiding this comment.
I actually don't know how numpy lays out its data in an ndarray - could we be a bit more precise here on what this void ptr points to?
jhale
reviewed
Feb 26, 2025
| arr: The NumPy array to get the void pointer from. | ||
|
|
||
| Returns: | ||
| A Numba signature and a code generation function that returns a void pointer |
Member
There was a problem hiding this comment.
Again, more precision on array's data.
Contributor
Author
There was a problem hiding this comment.
I have expanded on the comment and I have added a test.
Member
|
This looks fine to me, modulo the two comments on the docstrings related to 'numpy's data'. |
Contributor
Author
|
Has been replaced by #753 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add void* user_data to tabulate_tensor kernel to allow for easier extensions of non-standard integration kernels such as runtime kernels. Depends on dolfinx PR FEniCS/dolfinx#3643 .