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

allow declaration of custom operations at precompilation #405

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

simonbyrne
Copy link
Member

Fixes #404.

needs tests.

@vchuravy would this work on PPC? We should set up a CI build now that Travis supports PPC.

const op = Op(OP_NULL.val, nothing)
const $(esc(opwrap)) = OpWrapper{typeof($(esc(f))),$(esc(T))}($(esc(f)))
function initop()
fptr = @cfunction($opwrap, Cvoid, (Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cint}, Ptr{MPI_Datatype}))
Copy link
Member

Choose a reason for hiding this comment

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

Yes that should work with PPC. It is the dynamic version of @cfunction that requires an LLVM feature that doesn't work on PPC.

@simonbyrne
Copy link
Member Author

Is there any way we could do this without a macro, e.g. via a generated function? I don't see how because of the @cfunction, but it would be nice.

@sloede
Copy link
Member

sloede commented Apr 3, 2022

Would this fix #404 also for the M1? If yes, is there anything I can do to help getting it merged?

@mikesha2
Copy link

mikesha2 commented Jun 5, 2022

Also interested in this, since a few packages I use depend on MPI.jl (M1)

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.

Avoid closures for custom operators
4 participants