-
Notifications
You must be signed in to change notification settings - Fork 58
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
Continue to make KvikIO a shared library by moving code from hpp to cpp #581
base: branch-25.02
Are you sure you want to change the base?
Continue to make KvikIO a shared library by moving code from hpp to cpp #581
Conversation
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
/ok to test |
/ok to test |
/ok to test |
/ok to test |
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.
Approved trivial CMake changes
/* | ||
* Copyright (c) 2025, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include <kvikio/error.hpp> |
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.
Do we need this file?
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.
I'd like to have a .cpp
file for each .hpp
(except cuda/cufile_h_wrapper.hpp
). But it's just a matter of style. You make the call please 😄
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.
I think I lean more to no empty .cpp
:)
We could implement the body of the error macros in regular detail functions; to make them more readable and also give error.cpp
something to do :P
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.
Good idea. The catch is that the 3 macros defined in error.hpp
have an optional second parameter _exception_type
which is a type. So I only managed to improve the readability by moving most of the macro content to template functions. error.cpp
still has no wine.
Let me know if the new change is worth keeping.
In light of the initiative to make KvikiIO a shared library, this PR further separates the implementation from the interface as thoroughly as possible.
This PR is marked "breaking" because:
getenv_or
initially in thedetail
namespace has been moved outside to become part of the public API. cuDF uses this function and needs a timely code update.detail
namespace for internal use only have been relocated to the.cpp
files, so downstream applications that happen to use those entities will now see compile errors.Notes:
[[nodiscard]]
in the header now have them in the declaration (.hpp) only, not in the definition (.cpp).detail
namespace fromX.hpp
are now moved to the unnamed namespace in theX.cpp
files, unless they are used elsewhere (e.g.Y.cpp
).