pub struct FluidGpuPipeline {
pub passes: Vec<PipelinePass>,
pub total_bytes: usize,
}Expand description
Ordered fluid GPU pipeline with memory bandwidth estimation.
Dispatch order: advect → divergence → pressure solve → gradient subtract → vorticity confinement.
Fields§
§passes: Vec<PipelinePass>Ordered list of pipeline passes.
total_bytes: usizeTotal bytes transferred (sum over all passes).
Implementations§
Source§impl FluidGpuPipeline
impl FluidGpuPipeline
Sourcepub fn default_ns(n_cells: usize) -> Self
pub fn default_ns(n_cells: usize) -> Self
Build the default Navier-Stokes pipeline for an n-cell grid.
Sourcepub fn push(&mut self, pass: PipelinePass)
pub fn push(&mut self, pass: PipelinePass)
Add a custom pass to the pipeline.
Sourcepub fn bandwidth_gb_s(&self, elapsed_secs: f64) -> f64
pub fn bandwidth_gb_s(&self, elapsed_secs: f64) -> f64
Estimated memory bandwidth in GB/s, given elapsed time in seconds.
Trait Implementations§
Source§impl Clone for FluidGpuPipeline
impl Clone for FluidGpuPipeline
Source§fn clone(&self) -> FluidGpuPipeline
fn clone(&self) -> FluidGpuPipeline
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FluidGpuPipeline
impl RefUnwindSafe for FluidGpuPipeline
impl Send for FluidGpuPipeline
impl Sync for FluidGpuPipeline
impl Unpin for FluidGpuPipeline
impl UnsafeUnpin for FluidGpuPipeline
impl UnwindSafe for FluidGpuPipeline
Blanket Implementations§
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more