File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 54
54
return error (" Not implemented." )
55
55
end
56
56
57
- @interface :: AbstractArrayInterface function isstored (a:: SubArray , I:: Int... )
58
- return isstored (parent (a), Base. reindex (parentindices (a), I)... )
59
- end
60
-
61
57
# TODO : Use `Base.to_indices`?
62
58
isstored (a:: AbstractArray , I:: CartesianIndex ) = isstored (a, Tuple (I)... )
63
59
# TODO : Use `Base.to_indices`?
106
102
SparseArraysBase. storedvalues (:: T )
107
103
end
108
104
109
- @derive (T= SubArray,) begin
110
- SparseArraysBase. isstored (:: T , :: Int... )
111
- end
112
-
113
105
# TODO : Add `ndims` type parameter, like `Base.Broadcast.AbstractArrayStyle`.
114
106
# TODO : This isn't used to define interface functions right now.
115
107
# Currently, `@interface` expects an instance, probably it should take a
Original file line number Diff line number Diff line change @@ -106,6 +106,10 @@ function storedparentvalues(a::SubArray)
106
106
return StoredValues (parent (a), collect (eachstoredparentindex (a)))
107
107
end
108
108
109
+ @interface :: AbstractArrayInterface function isstored (a:: SubArray , I:: Int... )
110
+ return isstored (parent (a), index_to_parentindex (a, I... )... )
111
+ end
112
+
109
113
using LinearAlgebra: Transpose
110
114
function parentindex_to_index (a:: Transpose , I:: CartesianIndex{2} )
111
115
return cartesianindex_reverse (I)
You can’t perform that action at this time.
0 commit comments