You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/mir/ndslice/slice.d
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -552,6 +552,24 @@ package move or copy data. The operations are only carried out on lengths, strid
552
552
and pointers. If a slice is defined over a range, only the shift of the initial element
553
553
changes instead of the range.
554
554
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
+
555
573
$(H4 Internal Representation for Universal Slices)
0 commit comments