pub struct HeatKernelDispatcher { /* private fields */ }Expand description
GPU-accelerated heat diffusion dispatcher.
Implementations§
Source§impl HeatKernelDispatcher
impl HeatKernelDispatcher
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
Returns true when the backend is ready.
Sourcepub fn dispatch_step(&self, grid: &HeatGrid) -> GpuResult<Vec<f64>>
pub fn dispatch_step(&self, grid: &HeatGrid) -> GpuResult<Vec<f64>>
Dispatch a single forward-Euler heat-diffusion step.
§Errors
Returns GpuError::BackendUnavailable when compiled without the
gpu feature, or GpuError::InvalidInput when the grid is
malformed.
Sourcepub fn dispatch_steps(
&self,
grid: &HeatGrid,
n_steps: usize,
) -> GpuResult<HeatStepOutput>
pub fn dispatch_steps( &self, grid: &HeatGrid, n_steps: usize, ) -> GpuResult<HeatStepOutput>
Dispatch n_steps forward-Euler heat-diffusion steps and return the
final field plus the maximum value-change (L∞ norm).
§Errors
Returns GpuError::BackendUnavailable when the backend is not
ready.
Sourcepub fn cpu_reference_step(grid: &HeatGrid) -> Vec<f64>
pub fn cpu_reference_step(grid: &HeatGrid) -> Vec<f64>
CPU reference implementation of a single forward-Euler 2D heat stencil — public so the CPU fallback can re-use it. Boundary cells are held fixed (Dirichlet).
Trait Implementations§
Source§impl Debug for HeatKernelDispatcher
impl Debug for HeatKernelDispatcher
Source§impl Default for HeatKernelDispatcher
impl Default for HeatKernelDispatcher
Source§fn default() -> HeatKernelDispatcher
fn default() -> HeatKernelDispatcher
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HeatKernelDispatcher
impl RefUnwindSafe for HeatKernelDispatcher
impl Send for HeatKernelDispatcher
impl Sync for HeatKernelDispatcher
impl Unpin for HeatKernelDispatcher
impl UnsafeUnpin for HeatKernelDispatcher
impl UnwindSafe for HeatKernelDispatcher
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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>
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