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."))
3091
+
3092
+
@eval@propagate_inboundsfunctionwrap(::Type{Array}, m::MemoryRef{T}, dims::NTuple{N, Integer}) where {T, N}
3093
+
dims =convert(Dims, dims)
3094
+
ref =_wrap(m, dims)
3095
+
$(Expr(:new, :(Array{T, N}), :ref, :dims))
3096
+
end
3097
+
3098
+
@eval@propagate_inboundsfunctionwrap(::Type{Array}, m::Memory{T}, dims::NTuple{N, Integer}) where {T, N}
3099
+
dims =convert(Dims, dims)
3100
+
ref =_wrap(MemoryRef(m), dims)
3101
+
$(Expr(:new, :(Array{T, N}), :ref, :dims))
3102
+
end
3103
+
@eval@propagate_inboundsfunctionwrap(::Type{Array}, m::MemoryRef{T}, l::Integer) where {T}
3104
+
dims = (Int(l),)
3105
+
ref =_wrap(m, dims)
3106
+
$(Expr(:new, :(Array{T, 1}), :ref, :dims))
3107
+
end
3108
+
@eval@propagate_inboundsfunctionwrap(::Type{Array}, m::Memory{T}, l::Integer) where {T}
3109
+
dims = (Int(l),)
3110
+
ref =_wrap(MemoryRef(m), (l,))
3111
+
$(Expr(:new, :(Array{T, 1}), :ref, :dims))
3112
+
end
3113
+
@eval@propagate_inboundsfunctionwrap(::Type{Array}, m::Memory{T}) where {T}
0 commit comments