-
Notifications
You must be signed in to change notification settings - Fork 10
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
PermutedDimsArray, and layout for dense 1st index #12
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12 +/- ##
==========================================
+ Coverage 61.14% 61.34% +0.20%
==========================================
Files 8 8
Lines 700 727 +27
==========================================
+ Hits 428 446 +18
- Misses 272 281 +9
Continue to review full report at Codecov.
|
src/memorylayout.jl
Outdated
""" | ||
FirstMajor | ||
|
||
const FirstUnion = Union{FirstMajor, AbstractColumnMajor} |
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 don't think this needs to be in ArrayLayouts.jl: I tend to avoid union types due to compile time type inference issues (though something this simple won't be impacted to that) and its only used in one place.
If there's a strong reason to keep it, it needs a more descriptive name.
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.
OK, I removed this for now.
The argument for it is that you would almost never want to dispatch on UnitStride{1}
and exclude ColumnMajor, it just happens that there's no abstract type which fills this role.
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.
Hmm, I'm tempted to remove IncreasingStrides
and define
const ColumnMajor = UnitStride{1}
though perhaps some more thought is needed...
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 you mean ColumnMajor = Union{DenseColumnMajor, UnitStride{1}}
as a replacement for AbstractColumnMajor
?
One could also re-organise the type tree so that these two share a supertype. Does anything care about increasing strides, as opposed to just DenseColumnMajor
or UnitStride{1}
?
However I also need UnitStride{2}
, and clearly the tree can't depend on D
.
Looks good! If you address the minor comments and get the code coverage tests passing I'll merge. |
Closes #10
Not entirely sure whether
SecondMajor
will be needed in the end. (Nor what named things should have.)