pub struct OptimizationCriteria {
pub latency_weight: f32,
pub throughput_weight: f32,
pub memory_weight: f32,
pub accuracy_weight: f32,
pub compression_weight: f32,
}Expand description
Optimization criteria for selecting best quantization scheme
Fields§
§latency_weight: f32Weight for latency optimization (lower is better)
throughput_weight: f32Weight for throughput optimization (higher is better)
memory_weight: f32Weight for memory optimization (lower is better)
accuracy_weight: f32Weight for accuracy preservation (higher is better)
compression_weight: f32Weight for compression ratio (higher is better)
Implementations§
Source§impl OptimizationCriteria
impl OptimizationCriteria
Sourcepub fn optimize_for_speed() -> Self
pub fn optimize_for_speed() -> Self
Create criteria optimized for speed
Sourcepub fn optimize_for_accuracy() -> Self
pub fn optimize_for_accuracy() -> Self
Create criteria optimized for accuracy
Sourcepub fn optimize_for_size() -> Self
pub fn optimize_for_size() -> Self
Create criteria optimized for size
Sourcepub fn calculate_score(&self, result: &BenchmarkResult) -> f32
pub fn calculate_score(&self, result: &BenchmarkResult) -> f32
Calculate weighted score for a benchmark result
Trait Implementations§
Source§impl Clone for OptimizationCriteria
impl Clone for OptimizationCriteria
Source§fn clone(&self) -> OptimizationCriteria
fn clone(&self) -> OptimizationCriteria
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OptimizationCriteria
impl RefUnwindSafe for OptimizationCriteria
impl Send for OptimizationCriteria
impl Sync for OptimizationCriteria
impl Unpin for OptimizationCriteria
impl UnsafeUnpin for OptimizationCriteria
impl UnwindSafe for OptimizationCriteria
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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