Trait blaze_rs::context::Context

source ·
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§

source

fn as_raw(&self) -> &RawContext

Returns a reference to the underlying RawContext

source

fn queues(&self) -> &[CommandQueue]

Returns a slice with all of the Context’s command queues

source

fn next_queue(&self) -> &CommandQueue

Returns the next CommandQueue, as per context implementation

Provided Methods§

source

fn flush_all(&self) -> Result<()>

Flushes all the CommandQueues in the context.

source

fn finish_all(&self) -> Result<()>

Finishes all the CommandQueues in the context.

Implementations on Foreign Types§

source§

impl<T: ?Sized + Context> Context for Arc<T>

source§

impl<T: ?Sized + Context> Context for Rc<T>

source§

impl<T: ?Sized + Context> Context for &T

Implementors§