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: spec/latest/index.bs
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -371,16 +371,29 @@ whose non-implicit elements are themselves arrays specified by `level`. For
371
371
example, a sparse level of rank 1 represents a collection of sparse vectors of
372
372
subarrays.
373
373
374
+
If the `coniguous` key `true`, it indicates that all pointer arrays
375
+
form a single, contiguous 2-dimensional array. For the back-ends that
376
+
do not support storing 2-dimensional arrays, a single 1-dimensional flat array
377
+
may be used instead. The default value of `contiguous` is `false`.
378
+
374
379
Assume that this level represents `n`-dimensional subarrays and the root array
375
380
is `N`-dimensional. The sparse level implies the following binary arrays are
376
381
present:
377
382
378
383
: pointers_to_(N - n)
379
384
:: Array of size `number_of_positions + 1` whose 1st element is equal to `0` and whose `p + 1`th element is equal to the sum of `pointers_to_(N - n)[p]` and the number of explicitly represented slices in the `p`th position.
380
385
386
+
In addition, the following binary arrays are present if `contiguous` is `false`:
387
+
381
388
: indices_(N - n), ..., indices(N - n + r - 1)
382
389
:: There are `r` such arrays. When `A[i_0, ..., i_(r - 1), :, ..., :]` is explicitly represented by the subarray in position `q`, `indices_(N-n+s)[q] = i_s`. The arrays must be ordered such that the tuples `(indices_(N-n)[q], ..., indices_(N-n+r-1)[q])` are unique and appear in lexicographic order for all `q` in each range `pointers_to_(N-n)[p] <= q < pointers_to_(N-n)[p + 1]`. This array must contain no other elements.
383
390
391
+
Or the following binary array is present if `contiguous` is `true`:
392
+
393
+
: indices_from(N - n)_to(N - n + r - 1)
394
+
:: This is a single 2-dimensional array. When `A[i_0, ..., i_(r - 1), :, ..., :]` is explicitly represented by the subarray in position `q`, `indices_from(N - n)_to(N - n + r - 1)[s, q] = i_s`. The arrays must be ordered such that the tuples `(indices_from(N - n)_to(N - n + r - 1)[:, q])` are unique and appear in lexicographic order for all `q` in each range `pointers_to_(N-n)[p] <= q < pointers_to_(N-n)[p + 1]`. This array must contain no other elements.
395
+
396
+
384
397
Special note: If the sparse level is the root level, the `pointers` array should
385
398
be omitted, as its first value will be `0` and its last value will be the
386
399
length of any of the `indices` arrays in this level.
0 commit comments