Struct ocl::async::FutureMemMap
[−]
[src]
#[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 types methods may be renamed or otherwise changed at any time.
Methods
impl<T: OclPrm> FutureMemMap<T>
[src]
unsafe fn new(
core: MemMapCore<T>,
len: usize,
map_event: Event,
buffer: Mem,
queue: Queue
) -> FutureMemMap<T>
core: MemMapCore<T>,
len: usize,
map_event: Event,
buffer: Mem,
queue: Queue
) -> FutureMemMap<T>
Returns a new FutureMemMap
.
fn set_unmap_wait_list<El>(&mut self, wait_list: El) where
El: Into<EventList>,
El: Into<EventList>,
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.
fn create_unmap_target_event(&mut self) -> AsyncResult<&mut Event>
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.
fn wait(self) -> AsyncResult<MemMap<T>>
Blocks the current thread until the OpenCL command is complete and an appropriate lock can be obtained on the underlying data.
fn unmap_target_event(&self) -> Option<&Event>
Returns the unmap event if it has been created.
[UNSTABLE]: This method may be renamed or otherwise changed.
Trait Implementations
impl<T: Debug + OclPrm> Debug for FutureMemMap<T>
[src]
impl<T> Future for FutureMemMap<T> where
T: OclPrm + 'static,
[src]
T: OclPrm + 'static,
type Item = MemMap<T>
The type of value that this future will resolved with if it is successful. Read more
type Error = AsyncError
The type of error that this future will resolve with if it fails in a normal fashion. Read more
fn poll(&mut self) -> Poll<Self::Item, Self::Error>
Query this future to see if its value has become available, registering interest if it is not. Read more
fn wait(self) -> Result<Self::Item, Self::Error>
Block the current thread until this future is resolved. Read more
fn boxed(
self
) -> Box<Future<Error = Self::Error, Item = Self::Item> + 'static + Send> where
Self: Send + 'static,
self
) -> Box<Future<Error = Self::Error, Item = Self::Item> + 'static + Send> where
Self: Send + 'static,
Convenience function for turning this future into a trait object which is also Send
. Read more
fn map<F, U>(self, f: F) -> Map<Self, F> where
F: FnOnce(Self::Item) -> U,
F: FnOnce(Self::Item) -> U,
Map this future's result to a different type, returning a new future of the resulting type. Read more
fn map_err<F, E>(self, f: F) -> MapErr<Self, F> where
F: FnOnce(Self::Error) -> E,
F: FnOnce(Self::Error) -> E,
Map this future's error to a different error, returning a new future. Read more
fn from_err<E>(self) -> FromErr<Self, E> where
E: From<Self::Error>,
E: From<Self::Error>,
Map this future's error to any error implementing From
for this future's Error
, returning a new future. Read more
fn then<F, B>(self, f: F) -> Then<Self, B, F> where
B: IntoFuture,
F: FnOnce(Result<Self::Item, Self::Error>) -> B,
B: IntoFuture,
F: FnOnce(Result<Self::Item, Self::Error>) -> B,
Chain on a computation for when a future finished, passing the result of the future to the provided closure f
. Read more
fn and_then<F, B>(self, f: F) -> AndThen<Self, B, F> where
B: IntoFuture<Error = Self::Error>,
F: FnOnce(Self::Item) -> B,
B: IntoFuture<Error = Self::Error>,
F: FnOnce(Self::Item) -> B,
Execute another future after this one has resolved successfully. Read more
fn or_else<F, B>(self, f: F) -> OrElse<Self, B, F> where
B: IntoFuture<Item = Self::Item>,
F: FnOnce(Self::Error) -> B,
B: IntoFuture<Item = Self::Item>,
F: FnOnce(Self::Error) -> B,
Execute another future if this one resolves with an error. Read more
fn select<B>(self, other: B) -> Select<Self, B::Future> where
B: IntoFuture<Item = Self::Item, Error = Self::Error>,
B: IntoFuture<Item = Self::Item, Error = Self::Error>,
Waits for either one of two futures to complete. Read more
fn select2<B>(self, other: B) -> Select2<Self, B::Future> where
B: IntoFuture,
B: IntoFuture,
Waits for either one of two differently-typed futures to complete. Read more
fn join<B>(self, other: B) -> Join<Self, B::Future> where
B: IntoFuture<Error = Self::Error>,
B: IntoFuture<Error = Self::Error>,
Joins the result of two futures, waiting for them both to complete. Read more
fn join3<B, C>(self, b: B, c: C) -> Join3<Self, B::Future, C::Future> where
B: IntoFuture<Error = Self::Error>,
C: IntoFuture<Error = Self::Error>,
B: IntoFuture<Error = Self::Error>,
C: IntoFuture<Error = Self::Error>,
Same as join
, but with more futures.
fn join4<B, C, D>(
self,
b: B,
c: C,
d: D
) -> Join4<Self, B::Future, C::Future, D::Future> where
B: IntoFuture<Error = Self::Error>,
C: IntoFuture<Error = Self::Error>,
D: IntoFuture<Error = Self::Error>,
self,
b: B,
c: C,
d: D
) -> Join4<Self, B::Future, C::Future, D::Future> where
B: IntoFuture<Error = Self::Error>,
C: IntoFuture<Error = Self::Error>,
D: IntoFuture<Error = Self::Error>,
Same as join
, but with more futures.
fn join5<B, C, D, E>(
self,
b: B,
c: C,
d: D,
e: E
) -> Join5<Self, B::Future, C::Future, D::Future, E::Future> where
B: IntoFuture<Error = Self::Error>,
C: IntoFuture<Error = Self::Error>,
D: IntoFuture<Error = Self::Error>,
E: IntoFuture<Error = Self::Error>,
self,
b: B,
c: C,
d: D,
e: E
) -> Join5<Self, B::Future, C::Future, D::Future, E::Future> where
B: IntoFuture<Error = Self::Error>,
C: IntoFuture<Error = Self::Error>,
D: IntoFuture<Error = Self::Error>,
E: IntoFuture<Error = Self::Error>,
Same as join
, but with more futures.
fn into_stream(self) -> IntoStream<Self>
Convert this future into a single element stream. Read more
fn flatten(self) -> Flatten<Self> where
Self::Item: IntoFuture,
Self::Item::Error: From<Self::Error>,
Self::Item: IntoFuture,
Self::Item::Error: From<Self::Error>,
Flatten the execution of this future when the successful result of this future is itself another future. Read more
fn flatten_stream(self) -> FlattenStream<Self> where
Self::Item: Stream,
Self::Item::Error == Self::Error,
Self::Item: Stream,
Self::Item::Error == Self::Error,
Flatten the execution of this future when the successful result of this future is a stream. Read more
fn fuse(self) -> Fuse<Self>
Fuse a future such that poll
will never again be called once it has completed. Read more
fn catch_unwind(self) -> CatchUnwind<Self> where
Self: UnwindSafe,
Self: UnwindSafe,
Catches unwinding panics while polling the future. Read more
Create a cloneable handle to this future where all handles will resolve to the same result. Read more