Enum dslab_compute::multicore::CoresDependency
source · pub enum CoresDependency {
Linear,
LinearWithFixed {
fixed_part: f64,
},
Custom {
func: fn(_: u32) -> f64,
},
}Expand description
Function from [1, max_cores] to [1, +inf] describing the dependency
between the number of cores used for running a task and achieved parallel speedup.
Variants§
Linear
Linear dependency: speedup(cores) = cores
LinearWithFixed
Linear dependency with fixed part corresponding to Amdahl’s law:
speedup(cores) = 1 / (fixed_part + (1 - fixed_part) / cores)
Custom
Custom dependency.
Implementations§
Trait Implementations§
source§impl Clone for CoresDependency
impl Clone for CoresDependency
source§fn clone(&self) -> CoresDependency
fn clone(&self) -> CoresDependency
Returns a copy 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 moresource§impl Debug for CoresDependency
impl Debug for CoresDependency
source§impl Serialize for CoresDependency
impl Serialize for CoresDependency
impl Copy for CoresDependency
Auto Trait Implementations§
impl Freeze for CoresDependency
impl RefUnwindSafe for CoresDependency
impl Send for CoresDependency
impl Sync for CoresDependency
impl Unpin for CoresDependency
impl UnwindSafe for CoresDependency
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.