Struct coaster::backend::Backend
[−]
[src]
pub struct Backend<F: IFramework> { /* fields omitted */ }
Defines the main and highest struct of Coaster.
Methods
impl<F: IFramework + Clone> Backend<F>
[src]
Defines the functionality of the Backend.
fn new(config: BackendConfig<F>) -> Result<Backend<F>, Error>
Initialize a new native Backend from a BackendConfig.
fn hardwares(&self) -> &[F::H]
Returns the available hardware.
fn framework(&self) -> &Box<F>
Returns the backend framework.
fn device(&self) -> &F::D
Returns the backend device.
Trait Implementations
impl<F: Debug + IFramework> Debug for Backend<F> where
F::D: Debug,
[src]
F::D: Debug,
impl<F: Clone + IFramework> Clone for Backend<F> where
F::D: Clone,
[src]
F::D: Clone,
fn clone(&self) -> Backend<F>
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 IBackend for Backend<Native>
[src]
type F = Native
Represents the Framework of a Backend.
fn device(&self) -> &Cpu
Returns the backend device.
fn default() -> Result<Backend<Self::F>, Error> where
Self: Sized,
Self: Sized,
Try to create a default backend.
fn synchronize(&self) -> Result<(), Error>
Synchronize backend.
impl IBackend for Backend<OpenCL>
[src]
type F = OpenCL
Represents the Framework of a Backend.
fn device(&self) -> &Context
Returns the backend device.
fn default() -> Result<Backend<Self::F>, Error> where
Self: Sized,
Self: Sized,
Try to create a default backend.
fn synchronize(&self) -> Result<(), Error>
Synchronize backend.