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
Implement XTensor support in core. #976
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #976 +/- ##
==========================================
+ Coverage 86.48% 86.64% +0.15%
==========================================
Files 97 97
Lines 5951 5999 +48
==========================================
+ Hits 5147 5198 +51
+ Misses 804 801 -3 ☔ View full report in Codecov by Sentry. |
include/highfive/xtensor.hpp
Outdated
val.resize(shape); | ||
} |
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.
no recursivity here?
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.
None of it works with non-trivial elements. I should check if they even allow anything non-trivial.
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.
We're now asserting the fact. I propose we revisit, if we ever need to support them.
@alkino The reason for not allowing non-trivial elements, is that this way we can use It doesn't work for anything that contains non-trivial elements. |
The commit removes the requirement for a constexpr rank. Instead containers need a minimum and maximum constexpr rank. The difficulties are: * Empty arrays can't figure out their runtime rank. This is an issue when deducing the dimension when writing to disk. The "solution" is to deduce with lowest rank possible.
Adds support for `xt::xtensor`, `xt::xarray` and `xt::xview`, both row and column major. This works by wrapping the internal row-major with `xt::adapt`. Therefore, the `T` in `xt::xtensor<T, ...>` must be scalar (trivial).
Adds support for
xt::xtensor
, both row and column major. We're missingxt::xarray
and views. Views fail because they claim to have runtime variable rank.