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

Handle header only functions #267

Open
vchuravy opened this issue Jul 13, 2020 · 1 comment
Open

Handle header only functions #267

vchuravy opened this issue Jul 13, 2020 · 1 comment

Comments

@vchuravy
Copy link
Collaborator

In UCX.jl I used Clang to generate wrappers, but ucx provides a header only function ucp_init:

https://github.com/openucx/ucx/blob/0e37370648f857e23d5775a0c5b3aa609044e43c/src/ucp/api/ucp.h#L1446-L1452 which ended up as

https://github.com/JuliaParallel/UCX.jl/blob/2cc867f6c98f9f5f616f2df5aa1e666880dbfb62/gen/libucp_api.jl#L33-L35

and since it is a static header-only function it does not end up the shared object file.

x-ref: openucx/ucx#5404

@Gnimuc
Copy link
Member

Gnimuc commented Jul 14, 2020

The implementation of ucp_init is simple, but it's not trivial to handle these header-only helper functions in general, that would be equivalent to implement a C-to-Julia source code translator. I'm doubting whether this can be implemented only using libclang's API. For now, I think we should recognize these functions and skip them at least.

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

No branches or pull requests

2 participants