pub struct GpuPlotter<PG> { /* private fields */ }Expand description
GPU plotter
Implementations§
Source§impl<PG> GpuPlotter<PG>
impl<PG> GpuPlotter<PG>
Sourcepub fn new(
piece_getter: PG,
downloading_semaphore: Arc<Semaphore>,
gpu_records_encoders: Vec<GpuRecordsEncoder>,
global_mutex: Arc<AsyncMutex<()>>,
erasure_coding: ErasureCoding,
registry: Option<&mut Registry>,
) -> Result<Self, TryFromIntError>
pub fn new( piece_getter: PG, downloading_semaphore: Arc<Semaphore>, gpu_records_encoders: Vec<GpuRecordsEncoder>, global_mutex: Arc<AsyncMutex<()>>, erasure_coding: ErasureCoding, registry: Option<&mut Registry>, ) -> Result<Self, TryFromIntError>
Create a new instance.
Returns an error if empty list of encoders is provided.
Sourcepub fn on_plotting_progress(
&self,
callback: HandlerFn3<Ed25519PublicKey, SectorIndex, SectorPlottingProgress>,
) -> HandlerId
pub fn on_plotting_progress( &self, callback: HandlerFn3<Ed25519PublicKey, SectorIndex, SectorPlottingProgress>, ) -> HandlerId
Subscribe to plotting progress notifications
Trait Implementations§
Source§impl<PG> Debug for GpuPlotter<PG>
impl<PG> Debug for GpuPlotter<PG>
Source§impl<PG> Drop for GpuPlotter<PG>
impl<PG> Drop for GpuPlotter<PG>
Source§impl<PG> Plotter for GpuPlotter<PG>
impl<PG> Plotter for GpuPlotter<PG>
Source§fn has_free_capacity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn has_free_capacity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Whether plotter has free capacity to encode more sectors
Source§fn plot_sector<'life0, 'async_trait>(
&'life0 self,
public_key: Ed25519PublicKey,
sector_index: SectorIndex,
farmer_protocol_info: FarmerProtocolInfo,
pieces_in_sector: u16,
_replotting: bool,
progress_sender: Sender<SectorPlottingProgress>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn plot_sector<'life0, 'async_trait>(
&'life0 self,
public_key: Ed25519PublicKey,
sector_index: SectorIndex,
farmer_protocol_info: FarmerProtocolInfo,
pieces_in_sector: u16,
_replotting: bool,
progress_sender: Sender<SectorPlottingProgress>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Plot one sector, sending sector plotting events via the provided stream. Read more
Source§fn try_plot_sector<'life0, 'async_trait>(
&'life0 self,
public_key: Ed25519PublicKey,
sector_index: SectorIndex,
farmer_protocol_info: FarmerProtocolInfo,
pieces_in_sector: u16,
_replotting: bool,
progress_sender: Sender<SectorPlottingProgress>,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn try_plot_sector<'life0, 'async_trait>(
&'life0 self,
public_key: Ed25519PublicKey,
sector_index: SectorIndex,
farmer_protocol_info: FarmerProtocolInfo,
pieces_in_sector: u16,
_replotting: bool,
progress_sender: Sender<SectorPlottingProgress>,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Try to plot one sector, sending sector plotting events via the provided stream. Read more
Auto Trait Implementations§
impl<PG> Freeze for GpuPlotter<PG>where
PG: Freeze,
impl<PG> !RefUnwindSafe for GpuPlotter<PG>
impl<PG> Send for GpuPlotter<PG>where
PG: Send,
impl<PG> Sync for GpuPlotter<PG>where
PG: Sync,
impl<PG> Unpin for GpuPlotter<PG>where
PG: Unpin,
impl<PG> !UnwindSafe for GpuPlotter<PG>
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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