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
I've been thinking about writing a function cached (or allocate or optimize or something) such that
app =cached(@~f.(A * B, C))
would be transformed to
app = @~f.(materialize!(tmp, A * B), C)
with appropriate tmp array. This way, materialize!(dest, app) can be done without allocation. I think pre-allocations like this would be required between every boundary between Applied and Broadcasted, if you want to hoist out allocations.
A few questions:
I see that there is a LazyArrays.cache function. Is it related to this idea?
Does it make sense to have this in LazyArrays? Should it be developed outside?
The text was updated successfully, but these errors were encountered:
I've been thinking about writing a function
cached
(orallocate
oroptimize
or something) such thatwould be transformed to
with appropriate
tmp
array. This way,materialize!(dest, app)
can be done without allocation. I think pre-allocations like this would be required between every boundary betweenApplied
andBroadcasted
, if you want to hoist out allocations.A few questions:
LazyArrays.cache
function. Is it related to this idea?The text was updated successfully, but these errors were encountered: