-
Notifications
You must be signed in to change notification settings - Fork 3.9k
GH-38369: [MATLAB] Create utility functions for simplifying management of Proxy instances for Arrays
#46907
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
Conversation
…TypeProxyType -> TypeProxy
… to use wrap_and_manage utils
…ab/type/proxy/wrap.h
…_CLIENT_PROXY_SOURCES list
kevingurney
left a comment
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.
This looks like a great improvement to the way we are working with Proxy objects! Thanks for working on this!
Co-authored-by: Kevin Gurney <kevin.p.gurney@gmail.com>
Co-authored-by: Kevin Gurney <kevin.p.gurney@gmail.com>
Co-authored-by: Kevin Gurney <kevin.p.gurney@gmail.com>
kevingurney
left a comment
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
|
After merging your PR, Conbench analyzed the 2 benchmarking runs that have been run so far on merge-commit c5fdc8e. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
Rationale for this change
This is a follow up to #38357 (comment).
In the C++ code for the MATLAB interface, we frequently
wrap/unwrapArrow types, likearrow::Array, into/from a correspondinglibmexclassProxyobjects. This currently takes several lines of code, leading to lots of code duplication and introduces room for subtle implementation errors.It would be helpful to abstract away some of the steps involved in
Proxycreation/management into a set of helper utilities that we can reuse in the C++ code for the MATLAB interface.What changes are included in this PR?
std::shared_ptr<arrow::Array>in astd::shared_ptr<arrow::matlab::array::proxy::Array>. Its function signature isstd::shared_ptr<arrow::Array>in astd::shared_ptr<arrow::matlab::array::proxy::Array>and adds the proxy to thelibmexclass::proxy::ProxyManager. Its function signature isstd::shared_ptr<arrow::DataType>in astd::shared_ptr<arrow::matlab::type::proxy::Type>. Its function signature isstd::shared_ptr<arrow::DataType>in astd::shared_ptr<arrow::matlab::type::proxy::DataType>and adds the proxy to thelibmexclass::proxy::ProxyManager. It's function signature isarrow::matlab::array::proxy::wrapandarrow::matlab::type::proxy::wrapfunctions.Are these changes tested?
Tested via the existing MATLAB test classes.
Are there any user-facing changes?
No.
Proxyinstances forArrays #38369