-
Notifications
You must be signed in to change notification settings - Fork 35
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
Consolidate header naming convention #1325
Conversation
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.
Renaming the version header is a pretty big breaking change. Would it be terrible to define this:
#ifdef __cplusplus
#define CELER_INLINE_CONSTEXPR inline constexpr
#else
#define CELER_INLINE_CONSTEXPR static const
#endif
Or am I really overthinking the C compatibility? Naming C++ files with .h
is one of my many pet peeves I guess...
Right, this is quite a breaking change, it's good to do it before v1.0 if we ever want to do it. I suppose that checking for a C++ compiler is an option. Realistically, I can't think of any use case for C compatibility given that all our headers use C++17. I'm not an expert in C but if we go with the macro, shouldn't we still use inline instead of static: #ifdef __cplusplus
#define CELER_INLINE_CONSTEXPR inline constexpr
#else
#define CELER_INLINE_CONSTEXPR inline const
#endif |
OK, looking at the various scientific packages I have installed:
but more important than the extension spelling itself is the fact that the spelling is almost always consistent with the other extensions in that package. So I think using So while we're breaking backward compatibility: should we install to the even more consistent |
This is a good idea to move everything to |
The downside of that is the directory doesn't confer the same obvious package ownership as "celeritas" prefix does 🤔 |
maybe we could have |
@esseivaju I did originally make the "cmake strings" a separate file because I wanted to reduce the recompile impact of adding new metadata, relinking against different versions, etc... can you reassure me that's not really a problem in the big picture? 😅 (I think not but just want to run it by you.) I am not a big fan of |
Mmh right, we can save a bit on compile time by keeping them separated. If the user changes I don't have a strong opinion regarding the different filenames, we can move everything to sys if you prefer, but it seems less standard. Maybe add a |
@sethrj Ping on this, how about something like:
|
Sorry @esseivaju . I think it's ok to have the inline strings and I'm still conflicted about the updated paths. Maybe we should just have as you suggested :
And in another commit how about we define a top-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.
Looks good to me if these couple suggestions are considered. Thanks for all the tedious work that went into the updated paths.
Follow-on to celeritas-project#1325 . We don't need to "configure" the `.in` files since they're now static.
* Fix build with conda-supplied clang * Move config/version cmake and files to where they're used Follow-on to #1325 . We don't need to "configure" the `.in` files since they're now static. * Add a note about sincospi * Add note about where roctx comes from * Refactor sincospi definition for improved accuracy and readability * Provide true implementation of sincospi * Fix configure path * Hopefully fix GCC build error * Fix missing HD decorator * Expand cospi testing * Shortcut try-compile on subsequent builds and fix support for empty prefix
Consolidate header names to use the
.hh
extension. This includes the following changes:celeritas_cmake_string.h
andceleritas_config.h
consolidated and renamed tocorecel/Config.hh
celeritas_sys_config.h
renamed tocorecel/sys/Config.hh
celeritas_version.h
renamed tocorecel/Version.hh
corecel/device_runtime_api.h
renamed tocorecel/DeviceRuntimeApi.hh
corecel/Config.hh
and corecel/Version.hh`.clang-format
config to have config/version headers as a separate group and update deprecated optionsThe original
*.h
files are kept for backward compatibility with a warning message added for being deprecated.