pub struct PrefetchPlan { /* private fields */ }Expand description
Implementations§
Source§impl PrefetchPlan
impl PrefetchPlan
Sourcepub fn add(
&mut self,
ptr: u64,
byte_size: usize,
device_ordinal: i32,
) -> &mut Self
pub fn add( &mut self, ptr: u64, byte_size: usize, device_ordinal: i32, ) -> &mut Self
Records a prefetch operation.
The actual prefetch is deferred until execute.
Sourcepub fn entries(&self) -> &[PrefetchEntry]
pub fn entries(&self) -> &[PrefetchEntry]
Returns a slice of all recorded entries.
Sourcepub fn execute(&self, stream: &Stream) -> CudaResult<()>
pub fn execute(&self, stream: &Stream) -> CudaResult<()>
Executes all recorded prefetch operations on stream.
Each entry is issued as a separate mem_prefetch call targeting the
device identified by the entry’s device_ordinal. Operations are
enqueued in the order they were added.
§Errors
Returns the first error encountered. Entries before the failing one will already have been enqueued.
Trait Implementations§
Source§impl Clone for PrefetchPlan
impl Clone for PrefetchPlan
Source§fn clone(&self) -> PrefetchPlan
fn clone(&self) -> PrefetchPlan
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 moreSource§impl Debug for PrefetchPlan
impl Debug for PrefetchPlan
Auto Trait Implementations§
impl Freeze for PrefetchPlan
impl RefUnwindSafe for PrefetchPlan
impl Send for PrefetchPlan
impl Sync for PrefetchPlan
impl Unpin for PrefetchPlan
impl UnsafeUnpin for PrefetchPlan
impl UnwindSafe for PrefetchPlan
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