[][src]Struct fil_ocl::FutureMemMap

#[must_use = "futures do nothing unless polled"]
pub struct FutureMemMap<T: OclPrm> { /* fields omitted */ }

A future which resolves to a MemMap as soon as its creating command completes.

[UNSTABLE]: This type's methods may be renamed or otherwise changed at any time.

Methods

impl<T: OclPrm> FutureMemMap<T>[src]

pub unsafe fn new(
    core: MemMapCore<T>,
    len: usize,
    map_event: Event,
    buffer: Mem,
    queue: Queue
) -> FutureMemMap<T>
[src]

Returns a new FutureMemMap.

pub fn set_unmap_wait_events<El>(&mut self, wait_events: El) where
    El: Into<EventList>, 
[src]

Set an event wait list for the unmap command.

Setting a wait list here will disallow any wait list from being set later if/when calling unmap manually.

[UNSTABLE]: This method may be renamed or otherwise changed.

pub fn ewait_unmap<L: Into<EventList>>(self, wait_events: L) -> FutureMemMap<T>[src]

Set an event wait list for the unmap command.

See ::set_unmap_wait_events.

pub fn create_unmap_event(&mut self) -> OclResult<&mut Event>[src]

Create an event which will be triggered (set complete) after this future resolves into a MemMap and after that MemMap is dropped or manually unmapped.

The returned event can be added to the wait list of subsequent OpenCL commands with the expectation that when all preceeding futures are complete, the event will automatically be 'triggered' by having its status set to complete, causing those commands to execute. This can be used to inject host side code in amongst OpenCL commands without thread blocking or extra delays of any kind.

[UNSTABLE]: This method may be renamed or otherwise changed.

pub fn enew_unmap<En>(self, enew: En) -> FutureMemMap<T> where
    En: ClNullEventPtr
[src]

Specifies an event which will be triggered (set complete) after this future resolves into a MemMap and after that MemMap is dropped or manually unmapped.

See ::create_unmap_event.

pub fn set_unmap_queue(&mut self, queue: Queue)[src]

Specifies the queue to be used for the unmap command.

pub fn with_unmap_queue(self, queue: Queue) -> FutureMemMap<T>[src]

Specifies the queue to be used for the unmap command.

pub fn unmap_event(&self) -> Option<&Event>[src]

Returns the unmap event if it has been created.

[UNSTABLE]: This method may be renamed or otherwise changed.

pub fn wait(self) -> OclResult<MemMap<T>>[src]

Blocks the current thread until the OpenCL command is complete and an appropriate lock can be obtained on the underlying data.

Trait Implementations

impl<T: OclPrm> Send for FutureMemMap<T>[src]

impl<T: OclPrm> Sync for FutureMemMap<T>[src]

impl<T: Debug + OclPrm> Debug for FutureMemMap<T>[src]

impl<T> Future for FutureMemMap<T> where
    T: OclPrm + 'static, 
[src]

type Item = MemMap<T>

The type of value that this future will resolved with if it is successful. Read more

type Error = OclError

The type of error that this future will resolve with if it fails in a normal fashion. Read more

Auto Trait Implementations

impl<T> Unpin for FutureMemMap<T>

impl<T> UnwindSafe for FutureMemMap<T> where
    T: RefUnwindSafe

impl<T> RefUnwindSafe for FutureMemMap<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<F> IntoFuture for F where
    F: Future
[src]

type Future = F

The future that this type can be converted into.

type Item = <F as Future>::Item

The item that the future may resolve with.

type Error = <F as Future>::Error

The error that the future may resolve with.