-
Notifications
You must be signed in to change notification settings - Fork 47
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
Copy Ceed Object References #739
Conversation
Note: I can't reproduce the CI issue locally yet. I'm investigating - it might be a cargo_tarpaulin issue? |
This crate isn't building correctly in CI: https://github.com/KyleMayes/clang-sys |
c96b2aa
to
aaca7c7
Compare
I don't know how I fixed it, but I fixed CI. Ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks fine. Would using "reference" as a verb, as in CeedReference(Ceed ceed)
, with CeedReferenceCopy(Ceed src, Ceed *dest)
or CeedReferenceShare(Ceed src, Ceed *dest)
be better for autocomplete?
PETSc does not have a "copy" function like this, but it could be used most places where we currently spell out the operations.
e1542db
to
485a5fd
Compare
I updated the function names. A fix is in for rust-lang/rust on what I think the Rust issue is, but I don't know when it will merge. We should be ok to just merge whenever you're ready @jedbrown |
Co-authored-by: Jed Brown <jed@jedbrown.org>
485a5fd
to
db34a14
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeremylt Was there a specific reason for you to think this could be useful in MFEM?
Otherwise this looks good to me.
I don't have a current specific use case in mind - it just seems like something that might be useful in the future |
Rust is happy, but GitHub is confused. This is good but no green button for some reason |
This adds reference copying to libCEED. This creates a second, separate reference to the same Ceed object that can (and should) be independently destroyed.
@knepley, I think this will address your segfault. @YohannDudouit, this might also be of interest for MFEM.