OptimizedOp

Trait OptimizedOp 

Source
pub trait OptimizedOp<T> {
    // Required methods
    fn execute(&self, input: T) -> T;
    fn execute_simd(&self, input: T) -> T;
    fn execute_scalar(&self, input: T) -> T;

    // Provided method
    fn execute_auto(&self, input: T) -> T { ... }
}
Expand description

Runtime dispatch to optimized implementation

Required Methods§

Source

fn execute(&self, input: T) -> T

Execute the operation with the best available implementation

Source

fn execute_simd(&self, input: T) -> T

SIMD implementation

Source

fn execute_scalar(&self, input: T) -> T

Scalar fallback implementation

Provided Methods§

Source

fn execute_auto(&self, input: T) -> T

Execute with SIMD if available, fallback to scalar

Implementors§