pub struct DistributedGenerator { /* private fields */ }Expand description
Distributed dataset generator coordinator
Implementations§
Source§impl DistributedGenerator
impl DistributedGenerator
Sourcepub fn new(
config: DistributedConfig,
) -> Result<Self, Box<dyn Error + Send + Sync>>
pub fn new( config: DistributedConfig, ) -> Result<Self, Box<dyn Error + Send + Sync>>
Create a new distributed generator
Sourcepub fn calculate_sample_distribution(
&mut self,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub fn calculate_sample_distribution( &mut self, ) -> Result<(), Box<dyn Error + Send + Sync>>
Calculate sample distribution across nodes
Sourcepub fn get_current_node_samples(&self) -> usize
pub fn get_current_node_samples(&self) -> usize
Get the samples assigned to current node
Sourcepub fn start_generation(&mut self)
pub fn start_generation(&mut self)
Mark current node as working
Sourcepub fn complete_generation(&mut self, samples_generated: usize)
pub fn complete_generation(&mut self, samples_generated: usize)
Mark current node as completed
Sourcepub fn calculate_load_balance_efficiency(&self) -> f64
pub fn calculate_load_balance_efficiency(&self) -> f64
Calculate load balance efficiency
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DistributedGenerator
impl RefUnwindSafe for DistributedGenerator
impl Send for DistributedGenerator
impl Sync for DistributedGenerator
impl Unpin for DistributedGenerator
impl UnsafeUnpin for DistributedGenerator
impl UnwindSafe for DistributedGenerator
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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