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
Also, why is it necessary to have a separate function that returns a view? It might be better to return a view by default, and allow the user to create a copy by explicitly using copy or deepcopy, e.g. copy(ardata(u)), if that is needed.
The text was updated successfully, but these errors were encountered:
This is what happens when I don't write comments :(
The ar prefix I think was because the function indexes into the underlying array f.data.parent instead of the offset array.
At this point I think I've forgotten why they're all defined this way, I'd have to check to see where they're used. I suspect I used ardata somewhere where a view doesn't work. I think iterating over a non-contiguous view into an OffsetArray{CuArray} devolves into slow scalar operations.
Just highlights the need to prioritize cleaning up the field abstraction (#298).
What does
ardata
mean here:https://github.com/climate-machine/Oceananigans.jl/blob/c961d3904700e73b1a4aebb71ebcc3f518693014/src/fields.jl#L114
? I can't decipher the meaning of the
ar
prefix.Also, why is it necessary to have a separate function that returns a view? It might be better to return a view by default, and allow the user to create a copy by explicitly using
copy
ordeepcopy
, e.g.copy(ardata(u))
, if that is needed.The text was updated successfully, but these errors were encountered: