-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-39159 [C++]: Try to make Buffer::device_type_ non-optional #39150
Conversation
@pitrou if you're OK with the type change I will create an issue for this PR. |
cpp/src/arrow/buffer.h
Outdated
@@ -296,6 +296,7 @@ class ARROW_EXPORT Buffer { | |||
|
|||
const std::shared_ptr<MemoryManager>& memory_manager() const { return memory_manager_; } | |||
|
|||
/// XXX(felipecrv): can we change the return type to remove the optional? |
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.
+1
|
ef3ccf3
to
a43895d
Compare
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.
LGTM, thanks for fixing this @felipecrv
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 595b37c. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 9 possible false positives for unstable benchmarks that are known to sometimes produce them. |
…pache#39150) ### Rationale for this change Buffer should always have a device type. When unspecified, CPU can be assumed. ### What changes are included in this PR? A change of the member variable type and some adjustments. ### Are these changes tested? N/A. ### Are there any user-facing changes? **This PR includes breaking changes to public APIs.** `Buffer::device_type_` is now a `DeviceAllocationType` instead of a `std::optional<DeviceAllocationType>`. * Closes: apache#39159 Authored-by: Felipe Oliveira Carvalho <[email protected]> Signed-off-by: Felipe Oliveira Carvalho <[email protected]>
…pache#39150) ### Rationale for this change Buffer should always have a device type. When unspecified, CPU can be assumed. ### What changes are included in this PR? A change of the member variable type and some adjustments. ### Are these changes tested? N/A. ### Are there any user-facing changes? **This PR includes breaking changes to public APIs.** `Buffer::device_type_` is now a `DeviceAllocationType` instead of a `std::optional<DeviceAllocationType>`. * Closes: apache#39159 Authored-by: Felipe Oliveira Carvalho <[email protected]> Signed-off-by: Felipe Oliveira Carvalho <[email protected]>
…pache#39150) ### Rationale for this change Buffer should always have a device type. When unspecified, CPU can be assumed. ### What changes are included in this PR? A change of the member variable type and some adjustments. ### Are these changes tested? N/A. ### Are there any user-facing changes? **This PR includes breaking changes to public APIs.** `Buffer::device_type_` is now a `DeviceAllocationType` instead of a `std::optional<DeviceAllocationType>`. * Closes: apache#39159 Authored-by: Felipe Oliveira Carvalho <[email protected]> Signed-off-by: Felipe Oliveira Carvalho <[email protected]>
Rationale for this change
Buffer should always have a device type. When unspecified, CPU can be assumed.
What changes are included in this PR?
A change of the member variable type and some adjustments.
Are these changes tested?
N/A.
Are there any user-facing changes?
This PR includes breaking changes to public APIs.
Buffer::device_type_
is now aDeviceAllocationType
instead of astd::optional<DeviceAllocationType>
.