Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared image #56

Merged
merged 14 commits into from
May 11, 2024
Merged

Shared image #56

merged 14 commits into from
May 11, 2024

Conversation

HeroicKatora
Copy link
Member

Implementing two new buffers in texel which interact through the existing Texel type:

  • CellBuffer, keeping its data in a shared Rc and supporting concurrent modification.
  • AtomicBuffer, keeping its data in a shared Arc and supporting parallel modification in a manner that is potentially wait-free if the underlying platform primitives allow it. The effect of modifications is only specified if the user avoids aliasing but it is always sound.

Unfortunately the Image and derived layout-imbued buffers heavily depend on as_slice() -> &[P] which neither of these new types can provide. Even RawImage, the underlying private primitive, depends on traits that offer these methods as all byte-access is done through a direct byte slice for efficiency. Since I don't have a concrete idea on how to best approach this conflict, let's just put that for another time. This also includes lifting the types in canvas where it could be used for the shader / conversion code.

Andreas Molzer and others added 14 commits March 15, 2024 19:55
Those abstract the two main shared access memory slices: unsynchronous
and synchronous access to memory. The goal here is to find out which
actual operations will be possible under these two models. One main
limit has already been observed where atomic reads can not be trivially
broken up for the slice.

Due to this reason we stabilize the Cell types first, and deal with
synchronization at a later point.
This experiment wasn't public, and adds some complexity. Remove it until
request. We should balance the need for its implementation with the
abilities of concurrent buffers.
@HeroicKatora HeroicKatora marked this pull request as ready for review May 11, 2024 00:27
@HeroicKatora HeroicKatora merged commit ba36894 into master May 11, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant