Initial implicit sharing docs #1

Closed
Jacques Lucke wants to merge 2 commits from JacquesLucke/devdocs:implicit-sharing into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Showing only changes of commit b2e3a9146a - Show all commits

View File

@ -19,3 +19,7 @@ graph
meshB -->|read-access| data
sharing -->|owns| data
```
APIs that support implement sharing typically have two methods to access the same piece of data. One that gives read-only access (e.g. `Mesh.vert_positions() -> Span<float3>`) and one that gives write access and typically has `_for_write` in the name (e.g. `Mesh.vert_positions_for_write() -> MutableSpan<float3>`).
For raw data, the sharing info and the actual data are often separate allocations. However, in some cases it's benefitial to put both into the same allocation. For example, this is done for `GeometryComponent`. Here the entire geometry component can be implicitly shared between multiple geometry sets.