Skip to content

Commit aee78f0

Browse files
committed
Implement UnsafeArrays.uview for ArrayOfSimilarArrays
Adds UnsafeArrays to package requirements
1 parent 6399ca5 commit aee78f0

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

REQUIRE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
julia 0.6
22
Compat 0.54
3+
UnsafeArrays

src/ArraysOfArrays.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ using Compat
88
using Compat.Markdown
99
using Compat: axes
1010

11+
using UnsafeArrays
12+
1113
include("util.jl")
1214
include("array_of_similar_arrays.jl")
1315

src/array_of_similar_arrays.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,13 @@ Base.prepend!(dest::ArrayOfSimilarArrays{T,M,N}, src::AbstractArray{<:AbstractAr
157157
prepend!(dest, ArrayOfSimilarArrays(src))
158158

159159

160-
Base.view(A::ArrayOfSimilarArrays{T,M,N}, viewfunc::Function) where {T,M,N} =
161-
ArrayOfSimilarArrays{M}(A.data, viewfunc)
160+
# viewwith(A::ArrayOfSimilarArrays{T,M,N}, viewfunc::Function) where {T,M,N} =
161+
# ArrayOfSimilarArrays{M}(A.data, viewfunc)
162162

163163

164+
UnsafeArrays.uview(A::ArrayOfSimilarArrays{T,M,N}) where {T,M,N} =
165+
ArrayOfSimilarArrays{M}(uview(A.data), uview)
166+
164167

165168
const VectorOfSimilarArrays{
166169
T, M, L,

0 commit comments

Comments
 (0)