blaze-rs 1.0.3

A Rustified OpenCL Experience
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Contexts
A Blaze context is the owner of a single OpenCL context and one or more OpenCL command queues, all of them associated to the context.

It's task is to manage the distribution of command queues amongst the various _enqueue_ functions, maximizing performance by distributing the work amongst them.

The simplified signature of the `Context` trait is the following:

```rust,ignore
pub trait Context {
    fn as_raw (&self) -> &RawContext;
    fn queues (&self) -> &[RawCommandQueue];
    fn next_queue (&self) -> &RawCommandQueue;
}
```

The `queues` method returns a list with all the command queues owned by the context.\
The `next_queue` method returns the next command queue to be used in an _enqueue_ function.