pub enum ComputationMethod {
Stencil,
Actor,
BlockActor,
Persistent,
}Expand description
Computation method for GPU-accelerated simulation.
Variants§
Stencil
Traditional stencil-based GPU computation. Each thread reads neighbor values from global/shared memory. Fast and efficient for regular grids.
Actor
Actor-based GPU computation (cell-as-actor paradigm). Each spatial cell is an independent actor that:
- Holds its own state (pressure, cell type)
- Communicates with neighbors via message passing
- Uses HLC for temporal alignment
This method demonstrates the actor model on GPUs but may have higher overhead than stencil computation.
BlockActor
Block-based actor computation (hybrid approach). Each 8×8×8 block of cells is a single actor (512 cells per actor).
- Intra-block: Fast stencil computation with shared memory
- Inter-block: Double-buffered message passing (no atomics)
Combines actor model benefits with stencil performance. Expected: 10-50× faster than per-cell Actor method.
Persistent
Truly persistent GPU actor paradigm. A single kernel runs for the entire simulation lifetime:
- H2K (Host→Kernel) command messaging via mapped memory
- K2H (Kernel→Host) response messaging
- K2K halo exchange between blocks on device memory
- Grid-wide synchronization via cooperative groups
No kernel launch overhead per step - commands control simulation from host while GPU runs continuously.
Trait Implementations§
Source§impl Clone for ComputationMethod
impl Clone for ComputationMethod
Source§fn clone(&self) -> ComputationMethod
fn clone(&self) -> ComputationMethod
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ComputationMethod
impl Debug for ComputationMethod
Source§impl Default for ComputationMethod
impl Default for ComputationMethod
Source§fn default() -> ComputationMethod
fn default() -> ComputationMethod
Source§impl PartialEq for ComputationMethod
impl PartialEq for ComputationMethod
impl Copy for ComputationMethod
impl Eq for ComputationMethod
impl StructuralPartialEq for ComputationMethod
Auto Trait Implementations§
impl Freeze for ComputationMethod
impl RefUnwindSafe for ComputationMethod
impl Send for ComputationMethod
impl Sync for ComputationMethod
impl Unpin for ComputationMethod
impl UnwindSafe for ComputationMethod
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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<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>
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>
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