Skip to content

Commit ae255a9

Browse files
authored
Update index.md (#185)
1 parent 4b8c553 commit ae255a9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/src/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Additionally, `ArrayInterface.size` should only be used outside of generated fun
4545
Generally, `ArrayInterface.size` uses the return of `known_size` to form a static value for those dimensions with known length and only queries dimensions corresponding to `nothing`.
4646
For example, the previous example had a known size of `(1, nothing)`.
4747
Therefore, `ArrayInterface.size` would have compile time information about the first dimension returned as `static(1)` and would only look up the size of the second dimension at run time.
48+
This means the above example `ArrayInterface.size(a)` would lower to code similar to this at compile time: `Static.StaticInt(1), Base.arraysize(x, 1)`.
4849
Generic support for `ArrayInterface.known_size` relies on calling `known_length` for each type returned from `axes_types`.
4950
Therefore, the recommended approach for supporting static sizing in newly defined array types is defining a new `axes_types` method.
5051

0 commit comments

Comments
 (0)