Struct coaster::frameworks::opencl::OpenCL
[−]
[src]
pub struct OpenCL { /* fields omitted */ }
Provides the OpenCL Framework.
Trait Implementations
impl Debug for OpenCL
[src]
impl Clone for OpenCL
[src]
fn clone(&self) -> OpenCL
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl IOpenCL for OpenCL
[src]
impl IFramework for OpenCL
[src]
type H = Device
The Hardware representation for this Framework.
type D = Context
The Device representation for this Framework.
type B = Program
The Binary representation for this Framework.
fn ID() -> &'static str
Defines the Framework by a Name. Read more
fn new() -> OpenCL
Initializes a new Framework. Read more
fn load_hardwares() -> Result<Vec<Device>, Error>
Initializes all the available hardwares.
fn hardwares(&self) -> &[Device]
Returns the cached and available hardwares.
fn binary(&self) -> &Self::B
Returns the initialized binary.
fn new_device(&self, hardwares: &[Device]) -> Result<Self::D, Error>
Creates a new OpenCL context over one or many devices ready for computation.
Contexts are used by the OpenCL runtime for managing objects such as command-queues, memory, program and kernel objects and for executing kernels on one or more hardwares specified in the context. OpenCL allows to move memory within one context from one device to another without any explicit API calls.