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: README.md
-200Lines changed: 0 additions & 200 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,206 +16,6 @@ serve as a staging ground for ideas before they are merged into Base Julia. For
16
16
reason, no functionality is exported so that if such functions are added
17
17
and exported in a future Base Julia, there will be no issues with the upgrade.
18
18
19
-
## parent_type(x)
20
-
21
-
Returns the parent array that `x` wraps.
22
-
23
-
## can_change_size(x)
24
-
25
-
Returns `true` if the size of `T` can change, in which case operations
26
-
such as `pop!` and `popfirst!` are available for collections of type `T`.
27
-
28
-
## indices(x[, d])
29
-
30
-
Given an array `x`, this returns the indices along dimension `d`. If `x` is a tuple
31
-
of arrays, then the indices corresponding to dimension `d` of all arrays in `x` are
32
-
returned. If any indices are not equal along dimension `d`, an error is thrown. A
33
-
tuple may be used to specify a different dimension for each array. If `d` is not
34
-
specified, then indices for visiting each index of `x` are returned.
35
-
36
-
## ismutable(x)
37
-
38
-
A trait function for whether `x` is a mutable or an immutable array. Used for
39
-
dispatching to in-place and out-of-place versions of functions.
40
-
41
-
## aos_to_soa(x)
42
-
43
-
Converts an array of structs formulation to a struct of arrays.
44
-
45
-
## isstructured(x)
46
-
47
-
A trait function for whether a matrix `x` is a sparse structured matrix.
48
-
49
-
## can_setindex(x)
50
-
51
-
A trait function for whether an array `x` can use `setindex!`.
52
-
53
-
## has_sparsestruct(x)
54
-
55
-
Determine whether `findstructralnz` accepts the parameter `x`.
56
-
57
-
## findstructralnz(x)
58
-
59
-
Returns iterators `(I,J)` of the non-zeros in the structure of the matrix `x`.
60
-
The same as the first two elements of `findnz(::SparseMatrixCSC)`.
61
-
62
-
## fast_matrix_colors(A)
63
-
64
-
A trait function for whether `matrix_colors(A)` is a fast algorithm or a slow
65
-
(graphically-based) method.
66
-
67
-
## matrix_colors(A)
68
-
69
-
Returns an array for the sparsity colors of a matrix type `A`. Also includes
70
-
an abstract type `ColoringAlgorithm` for `matrix_colors(A,alg::ColoringAlgorithm)`
71
-
of non-structured matrices.
72
-
73
-
## fast_scalar_indexing(A)
74
-
75
-
A trait function for whether scalar indexing is fast on a given array type.
76
-
77
-
## allowed_getindex(A,i...)
78
-
79
-
A `getindex` which is always allowed.
80
-
81
-
## allowed_setindex!(A,v,i...)
82
-
83
-
A `setindex!` which is always allowed.
84
-
85
-
## lu_instance(A)
86
-
87
-
Returns an instance of the LU factorization object with the correct type
88
-
cheaply.
89
-
90
-
## issingular(A)
91
-
92
-
Returns an instance of the LU factorization object with the correct type cheaply.
93
-
94
-
## safevec(v)
95
-
96
-
Is a form of `vec` which is safe for all values in vector spaces, i.e., if it
97
-
is already a vector, like an AbstractVector or Number, it will return said
98
-
AbstractVector or Number.
99
-
100
-
## zeromatrix(u)
101
-
102
-
Creates the zero'd matrix version of `u`. Note that this is unique because
103
-
`similar(u,length(u),length(u))` returns a mutable type, so is not type-matching,
104
-
while `fill(zero(eltype(u)),length(u),length(u))` doesn't match the array type,
105
-
i.e., you'll get a CPU array from a GPU array. The generic fallback is
106
-
`u .* u' .* false`, which works on a surprising number of types, but can be broken
107
-
with weird (recursive) broadcast overloads. For higher-order tensors, this
108
-
returns the matrix linear operator type, which acts on the `vec` of the array.
109
-
110
-
## restructure(x,y)
111
-
112
-
Restructures the object `y` into a shape of `x`, keeping its values intact. For
113
-
simple objects, like an `Array`, this simply amounts to a reshape. However, for
114
-
more complex objects such as an `ArrayPartition`, not all of the structural
115
-
information is adequately contained in the type for standard tools to work. In
116
-
these cases, `restructure` gives a way to convert, for example, an `Array` into
117
-
a matching `ArrayPartition`.
118
-
119
-
## known_first(::Type{T})
120
-
121
-
If `first` of instances of type `T` are known at compile time, return that first
122
-
element. Otherwise, return `nothing`. For example, `known_first(Base.OneTo{Int})`
123
-
returns `one(Int)`.
124
-
125
-
## known_last(::Type{T})
126
-
127
-
If `last` of instances of type `T` are known at compile time, return that
128
-
last element. Otherwise, return `nothing`. For example,
129
-
`known_last(StaticArrays.SOneTo{4})` returns 4.
130
-
131
-
## known_step(::Type{T})
132
-
133
-
If `step` of instances of type `T` are known at compile time, return that step.
134
-
Otherwise, returns `nothing`. For example, `known_step(UnitRange{Int})` returns
135
-
`one(Int)`.
136
-
137
-
## known_length(::Type{T})
138
-
139
-
If `length` of an instance of type `T` is known at compile time, return it.
140
-
Otherwise, return `nothing`.
141
-
142
-
## device(::Type{T})
143
-
144
-
Indicates the most efficient way to access elements from the collection in low-level code.
145
-
For `GPUArrays`, returns `ArrayInterface.GPU()`.
146
-
For `AbstractArray` supporting a `pointer` method, returns `ArrayInterface.CPUPointer()`.
147
-
For other `AbstractArray`s and `Tuple`s, returns `ArrayInterface.CPUIndex()`.
148
-
Otherwise, returns `nothing`.
149
-
150
-
## contiguous_axis(::Type{T})
151
-
152
-
Returns the axis of an array of type `T` containing contiguous data.
153
-
If no axis is contiguous, it returns `Contiguous{-1}`.
154
-
If unknown, it returns `nothing`.
155
-
156
-
## contiguous_axis_indicator(::Type{T})
157
-
158
-
Returns a tuple of boolean `StaticBool`s indicating whether that axis is contiguous.
159
-
160
-
## contiguous_batch_size(::Type{T})
161
-
162
-
Returns the size of contiguous batches if `!isone(stride_rank(T, contiguous_axis(T)))`.
163
-
If `isone(stride_rank(T, contiguous_axis(T)))`, then returns `ContiguousBatch{0}()`.
164
-
If `contiguous_axis(T) == -1`, returns `ContiguousBatch{-1}()`.
165
-
If unknown, returns `nothing`.
166
-
167
-
## stride_rank(::Type{T})
168
-
169
-
Returns the rank of each stride.
170
-
171
-
## is_column_major(A)
172
-
173
-
Returns a `True` if `A` is column major, and a `True/False` otherwise.
174
-
175
-
## dense_dims(::Type{T})
176
-
Returns a tuple of indicators for whether each axis is dense.
177
-
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]`.
178
-
179
-
## ArrayInterface.size(A)
180
-
181
-
Returns the size of `A`. If the sizes of any axes are known at compile time,
182
-
these should be returned as `StaticInt`s. For example:
183
-
```julia
184
-
julia>using StaticArrays, ArrayInterface
185
-
186
-
julia> A =@SMatrixrand(3,4);
187
-
188
-
julia> ArrayInterface.size(A)
189
-
(static(3), static(4))
190
-
```
191
-
192
-
## ArrayInterface.strides(A)
193
-
194
-
Returns the strides of array `A`. If any strides are known at compile time,
195
-
these should be returned as `StaticInt`s. For example:
196
-
```julia
197
-
julia>using ArrayInterface
198
-
199
-
julia> A =rand(3,4);
200
-
201
-
julia> ArrayInterface.strides(A)
202
-
(static(1), 3)
203
-
```
204
-
## offsets(A)
205
-
206
-
Returns offsets of indices with respect to 0. If values are known at compile time,
207
-
it should return them as `StaticInt`s.
208
-
For example, if `A isa Base.Matrix`, `offsets(A) === (StaticInt(1), StaticInt(1))`.
209
-
210
-
## can_avx(f)
211
-
212
-
Is the function `f` whitelisted for `LoopVectorization.@avx`?
213
-
214
-
## `is_lazy_conjugate(A)`
215
-
216
-
Does the array `A` lazyily take complex conjugates of it's elements?
0 commit comments