Struct coaster::frameworks::opencl::context::Context
[−]
[src]
pub struct Context { /* fields omitted */ }
Defines a OpenCL Context.
Methods
impl Context
[src]
fn new(devices: Vec<Device>) -> Result<Context, Error>
Initializes a new OpenCL platform.
fn from_c(id: *mut c_void, devices: Vec<Device>) -> Context
Initializes a new OpenCL platform from its C type.
fn queue(&self) -> Option<&Queue>
Returns Queue for first device.
fn queue_mut(&mut self) -> &mut Queue
Returns mutable Queue for first device and creates it if it does not exist yet.
fn id(&self) -> isize
Returns the id as isize.
fn id_c(&self) -> *mut c_void
Returns the id as its C type.
Trait Implementations
impl Debug for Context
[src]
impl Clone for Context
[src]
fn clone(&self) -> Context
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 IDevice for Context
[src]
type H = Device
The Hardware representation for this Device.
type M = Memory
The Memory representation for this Device.
fn id(&self) -> &isize
Returns the unique identifier of the Device.
fn hardwares(&self) -> &Vec<Device>
Returns the hardwares, which define the Device.
fn alloc_memory(&self, size: usize) -> Result<Memory, DeviceError>
Allocate memory on the Device.
impl MemorySync for Context
[src]
fn sync_in(
&self,
my_memory: &mut Any,
src_device: &Any,
src_memory: &Any
) -> Result<(), DeviceError>
&self,
my_memory: &mut Any,
src_device: &Any,
src_memory: &Any
) -> Result<(), DeviceError>
FIXME
fn sync_out(
&self,
my_memory: &Any,
dst_device: &Any,
dst_memory: &mut Any
) -> Result<(), DeviceError>
&self,
my_memory: &Any,
dst_device: &Any,
dst_memory: &mut Any
) -> Result<(), DeviceError>
FIXME
impl PartialEq for Context
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.