-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Deprecate generic stride implementation (#17812), allow AbstractArrays to use BLAS/LAPACK routines (#25247) #25321
Changes from 1 commit
5c5d369
13eb90f
acaf1c2
93998ad
0858576
903c42e
4c2885d
d353ab0
31d4ce6
9c8fb44
d1086e0
579ceec
337785d
a558d76
7ce3036
346605b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -399,12 +399,12 @@ perhaps range-types `Ind` of your own design. For more information, see [Arrays | |
| `Base.unsafe_convert(::Type{Ptr{T}}, A)` | | Return the native address of an array. | | ||
|
||
|
||
A strided array is a sub-type of `AbstractArray` whose entries are stored in memory with fixed strides. | ||
A strided array is a subtype of `AbstractArray` whose entries are stored in memory with fixed strides. | ||
Provided the element type of the array is compatible with BLAS, a strided array can utilize BLAS and LAPACK routines | ||
for more efficient linear algebra routines. | ||
|
||
A typical example of a user defined strided array is one that wraps a standard `Array` | ||
with additional structure. | ||
A typical example of a user-defined strided array is one that wraps a standard `Array` | ||
with additional structure. | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd add a warning here too about how dangerous it is to implement these methods if the underlying storage is not actually strided. Otherwise the following might happen:
It might be useful to give some concrete examples of arrays and categorize them as to whether they have strided memory representation. Examples: 1:5 # not strided (there is no storage associated with this array, could segfault if implemented `strides`)
collect(1:5) # is strided
A = [1 5; 2 6; 3 7; 4 8] # is strided
V = view(A, 1:2, :) # is strided
V = view(A, 1:2:4, :) # is strided
V = view(A, [1,2,4], :) # is not strided |
||
|
||
|
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.
well, technically
cumprod
would return an array, whereas strides returns a tupleThere 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, that's not quite right since:
How about saying: