-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
motivation is from #153
Taking a view intends to minimize allocation. However, for some lazy arrays, allocating a concrete subarray could be more efficient. The proposal is as follows
maybeview(A::AbstractArray, args...) = maybeview(MemoryLayout(A), A, args...)
maybeview(::MemoryLayout, A, args...) = view(A, args...)
maybeview(::AbstractLazyLayout, A, args...) = A[args...] # at LazyArrays.jl
Metadata
Metadata
Assignees
Labels
No labels