Skip to content

Commit ac8033a

Browse files
committed
Update README for sd -> ArrayInterface. and Static -> StaticInt
1 parent 090dab9 commit ac8033a

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -167,47 +167,47 @@ Returns the rank of each stride.
167167
Returns a tuple of indicators for whether each axis is dense.
168168
An axis `i` of array `A` is dense if `stride(A, i) * size(A, i) == stride(A, j)` where `j` is the axis (if it exists) such that `stride_rank(A)[i] + 1 == stride_rank(A)[j]`.
169169

170-
## sdsize(A)
170+
## ArrayInterface.size(A)
171171

172172
Returns the size of `A`. If the size of any axes are known at compile time,
173-
these should be returned as `Static` numbers. For example:
173+
these should be returned as `StaticInt`s. For example:
174174
```julia
175175
julia> using StaticArrays; using ArrayInterface: sdsize
176176

177177
julia> A = @SMatrix rand(3,4);
178178

179-
julia> sdsize(A)
180-
(Static{3}(), Static{4}())
179+
julia> ArrayInterface.size(A)
180+
(StaticInt{3}(), StaticInt{4}())
181181
```
182182

183-
## sdstrides(A)
183+
## ArrayInterface.strides(A)
184184

185185
Returns the strides of array `A`. If any strides are known at compile time,
186-
these should be returned as `Static` numbers. For example:
186+
these should be returned as `StaticInt`s. For example:
187187
```julia
188188
julia> using ArrayInterface: sdstrides
189189

190190
julia> A = rand(3,4);
191191

192-
julia> sdstrides(A)
193-
(Static{1}(), 3)
192+
julia> ArrayInterface.strides(A)
193+
(StaticInt{1}(), 3)
194194
```
195-
## sdoffsets(A)
195+
## offsets(A)
196196

197197
Returns offsets of indices with respect to 0. If values are known at compile time,
198-
it should return them as `Static` numbers.
199-
For example, if `A isa Base.Matrix`, `sdoffsets(A) === (Static(1), Static(1))`.
198+
it should return them as `StaticInt`s.
199+
For example, if `A isa Base.Matrix`, `sdoffsets(A) === (StaticInt(1), StaticInt(1))`.
200200

201201
## can_avx(f)
202202

203203
Is the function `f` whitelisted for `LoopVectorization.@avx`?
204204

205-
## Static(N::Int)
205+
## StaticInt(N::Int)
206206

207207
Creates a static integer with value known at compile time. It is a number,
208-
supporting basic arithmetic. Many operations with two `Static` integers
209-
will produce another `Static` integer. If one of the arguments to a
210-
function call isn't static (e.g., `Static(4) + 3`) then the `Static`
208+
supporting basic arithmetic. Many operations with two `StaticInt` integers
209+
will produce another `StaticInt` integer. If one of the arguments to a
210+
function call isn't static (e.g., `StaticInt(4) + 3`) then the `StaticInt`
211211
number will promote to a dynamic value.
212212

213213
# List of things to add

0 commit comments

Comments
 (0)