pub struct AutoDispatcher { /* private fields */ }Expand description
Automatic dispatcher that chooses CPU (SIMD) or GPU based on batch size.
For small batches (< threshold), SIMD-optimized CPU operations are used. For large batches (>= threshold), GPU compute shaders are used.
Implementations§
Source§impl AutoDispatcher
impl AutoDispatcher
Sourcepub async fn with_threshold(threshold: usize) -> Self
pub async fn with_threshold(threshold: usize) -> Self
Create with a custom threshold.
Sourcepub async fn geometric_product(
&self,
a: &[GA3],
b: &[GA3],
) -> Result<Vec<GA3>, GpuError>
pub async fn geometric_product( &self, a: &[GA3], b: &[GA3], ) -> Result<Vec<GA3>, GpuError>
Batch geometric product with automatic dispatch.
Uses GPU for large batches, SIMD-optimized CPU for small batches.
Sourcepub async fn addition(&self, a: &[GA3], b: &[GA3]) -> Result<Vec<GA3>, GpuError>
pub async fn addition(&self, a: &[GA3], b: &[GA3]) -> Result<Vec<GA3>, GpuError>
Batch addition with automatic dispatch.
Uses GPU for large batches, SIMD-optimized CPU for small batches.
Sourcepub async fn sandwich(
&self,
rotors: &[GA3],
vectors: &[GA3],
) -> Result<Vec<GA3>, GpuError>
pub async fn sandwich( &self, rotors: &[GA3], vectors: &[GA3], ) -> Result<Vec<GA3>, GpuError>
Batch sandwich product with automatic dispatch.
Uses GPU for large batches, SIMD-optimized CPU for small batches.
Auto Trait Implementations§
impl Freeze for AutoDispatcher
impl !RefUnwindSafe for AutoDispatcher
impl Send for AutoDispatcher
impl Sync for AutoDispatcher
impl Unpin for AutoDispatcher
impl UnsafeUnpin for AutoDispatcher
impl !UnwindSafe for AutoDispatcher
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