-
Notifications
You must be signed in to change notification settings - Fork 125
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
[NDTensors] Add SmallVectors
submodule
#1202
Conversation
@emstoudenmire one goal was to define an abstract interface |
Unfortunately the design of the mutable types right now relies on a feature that was made available in Julia 1.8 for marking certain fields as |
Codecov ReportAll modified lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1202 +/- ##
===========================================
- Coverage 85.41% 67.37% -18.05%
===========================================
Files 88 87 -1
Lines 8426 8388 -38
===========================================
- Hits 7197 5651 -1546
- Misses 1229 2737 +1508
☔ View full report in Codecov by Sentry. |
Looks good & the interface is clear. More convenient that a plain SArray (or MArray) for sure. When it's merged I will go ahead and use it for the new QN type. |
Description
This adds a submodule to
NDTensors
calledSmallVectors
which defines the typesSmallVector
andMSmallVector
which are stack allocated with a maximum compile-time length but have a runtime length that can be less than the maximum compile-time length. The goal is for this type to be used by theQN
type and theTagSet
type, which both have a similar storage requirement. This should also make it easier to allow users to customize the types if they want to.Here's an example of some functionality:
The test suite has various tests of common operations to test that they have zero allocations.
@emstoudenmire