Skip to content

Commit cdfc04b

Browse files
committed
fix issue #237
1 parent f363759 commit cdfc04b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

source/mir/ndslice/slice.d

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,24 @@ package move or copy data. The operations are only carried out on lengths, strid
552552
and pointers. If a slice is defined over a range, only the shift of the initial element
553553
changes instead of the range.
554554
555+
Mir n-dimensional Slices can be one of the three kinds.
556+
557+
$(H4 Contiguous slice)
558+
559+
Contiguous in memory (or in a user-defined iterator's field) row-major tensor that doesn't store strides because they can be computed on the fly using lengths.
560+
The row stride is always equaled 1.
561+
562+
$(H4 Canonical slice)
563+
564+
Canonical slice as contiguous in memory (or in a user-defined iterator's field) rows of a row-major tensor, it doesn't store the stride for row dimension because it is always equaled 1.
565+
BLAS/LAPACK matrices are Canonical but originally have column-major order.
566+
In the same time you can use 2D Canonical Slices with LAPACK assuming that rows are columns and columns are rows.
567+
568+
$(H4 Universal slice)
569+
570+
A row-major tensor that stores the strides for all dimensions.
571+
NumPy strides are Universal.
572+
555573
$(H4 Internal Representation for Universal Slices)
556574
557575
Type definition

0 commit comments

Comments
 (0)