pub struct WasmSimdEngine { /* private fields */ }Expand description
WebAssembly SIMD optimization engine
Implementations§
Source§impl WasmSimdEngine
impl WasmSimdEngine
Sourcepub fn new(config: WasmSimdConfig) -> Result<Self>
pub fn new(config: WasmSimdConfig) -> Result<Self>
Create a new WebAssembly SIMD optimization engine
Sourcepub fn detect_simd_support() -> bool
pub fn detect_simd_support() -> bool
Detect WebAssembly SIMD support
Sourcepub fn optimize_tensor_operation(
&mut self,
operation: SimdOperationType,
input: &Tensor,
weights: Option<&Tensor>,
) -> Result<Tensor>
pub fn optimize_tensor_operation( &mut self, operation: SimdOperationType, input: &Tensor, weights: Option<&Tensor>, ) -> Result<Tensor>
Optimize tensor operation using SIMD
Sourcepub fn get_performance_metrics(&self) -> &SimdPerformanceMetrics
pub fn get_performance_metrics(&self) -> &SimdPerformanceMetrics
Get current performance metrics
Sourcepub fn benchmark_operations(
&mut self,
) -> Result<HashMap<SimdOperationType, f64>>
pub fn benchmark_operations( &mut self, ) -> Result<HashMap<SimdOperationType, f64>>
Benchmark SIMD operations
Sourcepub fn export_performance_report(&self) -> String
pub fn export_performance_report(&self) -> String
Export performance report
Auto Trait Implementations§
impl Freeze for WasmSimdEngine
impl RefUnwindSafe for WasmSimdEngine
impl Send for WasmSimdEngine
impl Sync for WasmSimdEngine
impl Unpin for WasmSimdEngine
impl UnsafeUnpin for WasmSimdEngine
impl UnwindSafe for WasmSimdEngine
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> 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