Several of OpenUSD's VtArray types utilize internal copy-on-write semantics. Some operations like the non-const data() will trigger a deep array copy.
However, exposing the const-pointer via cdata() guarantees zero-copy read-only operations, bypassing copy overhead entirely.
Would it be possible to expose Overlay.cdata() overrides for some or all of the VtArray types in a similar fashion to this revision?
I would be happy to create a PR for this if this would be a value add to the project, thanks!
Several of OpenUSD's VtArray types utilize internal copy-on-write semantics. Some operations like the non-const
data()will trigger a deep array copy.However, exposing the const-pointer via
cdata()guarantees zero-copy read-only operations, bypassing copy overhead entirely.Would it be possible to expose
Overlay.cdata()overrides for some or all of the VtArray types in a similar fashion to this revision?I would be happy to create a PR for this if this would be a value add to the project, thanks!