pub trait Context {
// Required methods
fn as_raw(&self) -> &RawContext;
fn queues(&self) -> &[CommandQueue];
fn next_queue(&self) -> &CommandQueue;
// Provided methods
fn flush_all(&self) -> Result<()> { ... }
fn finish_all(&self) -> Result<()> { ... }
}
Expand description
An object that can be used as a Blaze context, with a similar syntax to Rust allocators.
Blaze contexts are similar to OpenCL contexts, except they’re also in charge of administrating and supplying
their various command queues. This allows Blaze contexts to manage the load between the various devices in an
OpenCL context.
Required Methods§
sourcefn as_raw(&self) -> &RawContext
fn as_raw(&self) -> &RawContext
Returns a reference to the underlying RawContext
sourcefn queues(&self) -> &[CommandQueue]
fn queues(&self) -> &[CommandQueue]
Returns a slice with all of the Context
’s command queues
sourcefn next_queue(&self) -> &CommandQueue
fn next_queue(&self) -> &CommandQueue
Returns the next CommandQueue
, as per context implementation
Provided Methods§
sourcefn flush_all(&self) -> Result<()>
fn flush_all(&self) -> Result<()>
Flushes all the CommandQueue
s in the context.
sourcefn finish_all(&self) -> Result<()>
fn finish_all(&self) -> Result<()>
Finishes all the CommandQueue
s in the context.