-
Notifications
You must be signed in to change notification settings - Fork 10
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
refactor!: harmonize syntax & include order of headers #127
refactor!: harmonize syntax & include order of headers #127
Conversation
Follow-up questions (may be left for another PR):
See the Beman Project — an effort to support open-source, community-driven implementations of standard C++ paper proposals — example library structure for more guidance: https://github.com/beman-project/exemplar I understand that I may be nitpicking here, feel free to dismiss the ideas if you think they're irrelevant to KokkosComm! 🙂 |
It is not clear that we will be a header-only library forever. It might be interesting to have some precompiled parts to hide some internals in our compiling units. As for |
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.
A simpler PR with changes focused on the tests and core files where the relative include is upward will be better suited to solve the issue.
Removes all instances of relative paths in favor of system include-style syntax: `<KokkosComm/...>
Signed-off-by: Gabriel Dos Santos <[email protected]>
Signed-off-by: Gabriel Dos Santos <[email protected]>
Signed-off-by: Gabriel Dos Santos <[email protected]>
Signed-off-by: Gabriel Dos Santos <[email protected]>
Follow C++ Core Guidelines and Google C++ Style Guide for the order of included headers. Headers are included in the following order: 1. Parent header (KokkosComm is not concerned by this); 2. C system headers; 3. C++ standard library headers; 4. External library headers (priority to C-based libraries); 5. Project headers: - Base path with `<>` for any header that is "less deeply nested" than the current header; - Relative path with `""` for headers that are at the same level or "more deeply nested" than the current header. 6. Project implementation detail headers (same syntax rules as the prior level). We leave a blank line between each of the above-defined include orders. Signed-off-by: Gabriel Dos Santos <[email protected]>
Signed-off-by: Gabriel Dos Santos <[email protected]>
Signed-off-by: Gabriel Dos Santos <[email protected]>
Signed-off-by: Gabriel Dos Santos <[email protected]>
b3e54a1
to
80d9d2f
Compare
Finally coming around to finish this PR! We now follow C++ Core Guidelines and Google C++ Style Guide for the order of included headers. Headers are included in the following order, and separated by a blank line between each level:
|
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.
Assuming mpi.hpp
will be renamed and semantic blocks will be used to separate header files in KokkosComm.hpp
(as already indicated in comments), I fully support these changes.
Co-authored-by: Cédric Chevalier <[email protected]>
874bf35
Co-authored-by: Cédric Chevalier <[email protected]>
An important question while we are at it: should KokkosComm "export" Kokkos Core? Currently, we include What do you think @cedricchevalier19 @cwpearson @nicoleavans ? |
Signed-off-by: Gabriel Dos Santos <[email protected]>
Signed-off-by: Gabriel Dos Santos <[email protected]>
Signed-off-by: Gabriel Dos Santos <[email protected]>
Order is: 1. Main MPI CommSpace header; 2. Structures that need to be exposed (handles, requests, channels soon); 3. Point-to-point functions; 4. Collectives; 5. Utils (only Barrier for now but think Test, Wait, etc.). Signed-off-by: Gabriel Dos Santos <[email protected]>
It is a very good point. Ideally we should not export Kokkos Core, but if we do not do this we are not self usable anymore. I think we can try to get rid of it and see if it is too annoying for our prospective users. |
Signed-off-by: Gabriel Dos Santos <[email protected]>
Signed-off-by: Gabriel Dos Santos <[email protected]>
Signed-off-by: Gabriel Dos Santos <[email protected]>
Signed-off-by: Gabriel Dos Santos <[email protected]>
Signed-off-by: Gabriel Dos Santos <[email protected]>
Signed-off-by: Gabriel Dos Santos <[email protected]>
Thanks @dssgabriel! You also raise some good questions. I don't think we can practically avoid exporting |
Isn't it sufficient to export Since tests are passing without it in our main header, I think we can merge it like this and revert back to including it if that's too annoying for our users. |
Fixes #120.
Removes all instances of relative paths in favor of system include-style syntax:
<KokkosComm/...>
I think we can also get rid of the
KokkosComm/mpi/impl/include_mpi.hpp
header?