-
Notifications
You must be signed in to change notification settings - Fork 18
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
Faster Contigous Views of 4D Arrays #43
Conversation
@@ -94,6 +94,32 @@ roffset{T}(a::StridedArray{T,3}, i1::SubsNC, i2::SubsNC, i3::Colon) = | |||
roffset{T}(a::StridedArray{T,3}, i1::SubsNC, i2::SubsNC, i3::SubsNC) = | |||
_offset(i1) * stride(a,1) + _offset(i2) * stride(a,2) + _offset(i3) * stride(a,3) | |||
|
|||
|
|||
# 4D (parial) |
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.
parial->partial.
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.
Whoops, fixed.
Following the coveralls link, it looks like at least one of your new functions isn't checked by the test, and moreover the generic splatting fallback isn't tested anymore. |
Interesting, I'll add a few more tests |
Nice! |
This adds some
roffset
methods for 4D arrays. This makes constructing an contiguousunsafe_view
of a 4D array roughly 2.5x faster.Using the benchmark here:
before:
after: