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
"Attempted to wrap a MemoryRef of length $len with an Array of size dims=$dims, which is invalid because prod(dims) = $proddims > $len, so that the array would have more elements than the underlying memory can store."))
3087
+
3088
+
@eval@propagate_inboundsfunctionwrap(::Type{Array}, m::MemoryRef{T}, dims::NTuple{N, Integer}) where {T, N}
3089
+
dims =convert(Dims, dims)
3090
+
ref =_wrap(m, dims)
3091
+
$(Expr(:new, :(Array{T, N}), :ref, :dims))
3092
+
end
3093
+
3094
+
@eval@propagate_inboundsfunctionwrap(::Type{Array}, m::Memory{T}, dims::NTuple{N, Integer}) where {T, N}
3095
+
dims =convert(Dims, dims)
3096
+
ref =_wrap(MemoryRef(m), dims)
3097
+
$(Expr(:new, :(Array{T, N}), :ref, :dims))
3098
+
end
3099
+
@eval@propagate_inboundsfunctionwrap(::Type{Array}, m::MemoryRef{T}, l::Integer) where {T}
3100
+
dims = (Int(l),)
3101
+
ref =_wrap(m, dims)
3102
+
$(Expr(:new, :(Array{T, 1}), :ref, :dims))
3103
+
end
3104
+
@eval@propagate_inboundsfunctionwrap(::Type{Array}, m::Memory{T}, l::Integer) where {T}
3105
+
dims = (Int(l),)
3106
+
ref =_wrap(MemoryRef(m), (l,))
3107
+
$(Expr(:new, :(Array{T, 1}), :ref, :dims))
3108
+
end
3109
+
@eval@propagate_inboundsfunctionwrap(::Type{Array}, m::Memory{T}) where {T}
0 commit comments