pub struct TileGpuBuffers<B> {
pub pressure_a: B,
pub pressure_b: B,
pub halo_north: B,
pub halo_south: B,
pub halo_west: B,
pub halo_east: B,
pub current_is_a: bool,
pub tile_size: u32,
pub buffer_width: u32,
}Expand description
GPU buffers for a single tile.
Uses generic Buffer type to support both CUDA and WGPU backends.
Fields§
§pressure_a: BCurrent pressure buffer (18x18 with halos).
pressure_b: BPrevious pressure buffer (18x18 with halos).
halo_north: BStaging buffers for halo extraction (4 edges × 16 cells).
halo_south: B§halo_west: B§halo_east: B§current_is_a: boolWhich buffer is “current” (true = A, false = B).
tile_size: u32Tile interior size.
buffer_width: u32Buffer width including halos.
Implementations§
Source§impl<B> TileGpuBuffers<B>
impl<B> TileGpuBuffers<B>
Sourcepub fn buffer_width(&self) -> u32
pub fn buffer_width(&self) -> u32
Get buffer width (tile_size + 2 for halos).
Sourcepub fn buffer_size(&self) -> usize
pub fn buffer_size(&self) -> usize
Get total buffer size in f32 elements.
Sourcepub fn halo_buffer(&self, edge: Edge) -> &B
pub fn halo_buffer(&self, edge: Edge) -> &B
Get halo buffer for an edge.
Sourcepub fn halo_buffer_mut(&mut self, edge: Edge) -> &mut B
pub fn halo_buffer_mut(&mut self, edge: Edge) -> &mut B
Get mutable halo buffer for an edge.
Auto Trait Implementations§
impl<B> Freeze for TileGpuBuffers<B>where
B: Freeze,
impl<B> RefUnwindSafe for TileGpuBuffers<B>where
B: RefUnwindSafe,
impl<B> Send for TileGpuBuffers<B>where
B: Send,
impl<B> Sync for TileGpuBuffers<B>where
B: Sync,
impl<B> Unpin for TileGpuBuffers<B>where
B: Unpin,
impl<B> UnwindSafe for TileGpuBuffers<B>where
B: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Turns some type into the initial state of some
Application.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.