pub struct GpuNumericEngine { /* private fields */ }Expand description
Owns a wgpu device, queue, and compiled numeric compute pipeline.
Create once (async), then call GpuNumericEngine::run for each batch of NumericRule.
Implementations§
Source§impl GpuNumericEngine
impl GpuNumericEngine
Sourcepub async fn new() -> Self
pub async fn new() -> Self
Requests the default adapter and builds the numeric compute pipeline.
§Panics
Panics if no adapter or device is available (appropriate for examples; production code should handle errors).
Sourcepub fn run(&self, rules: &[NumericRule]) -> Vec<NumericOutput>
pub fn run(&self, rules: &[NumericRule]) -> Vec<NumericOutput>
Uploads rules, dispatches ceil(n / 64) workgroups, copies results back, and returns one
NumericOutput per input row (blocking until the GPU finishes).
Auto Trait Implementations§
impl Freeze for GpuNumericEngine
impl !RefUnwindSafe for GpuNumericEngine
impl Send for GpuNumericEngine
impl Sync for GpuNumericEngine
impl Unpin for GpuNumericEngine
impl UnsafeUnpin for GpuNumericEngine
impl !UnwindSafe for GpuNumericEngine
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> 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