Struct collenchyma::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 IDeviceSyncOut<FlatBox> for Context
[src]
type M = Memory
The Memory representation for this Device.
fn sync_out(
&self,
source_data: &Memory,
dest_data: &mut FlatBox
) -> Result<(), DeviceError>
&self,
source_data: &Memory,
dest_data: &mut FlatBox
) -> Result<(), DeviceError>
Synchronizes memory from source_data
to dest_data
.
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.
fn sync_in(
&self,
source: &DeviceType,
source_data: &MemoryType,
dest_data: &mut Memory
) -> Result<(), DeviceError>
&self,
source: &DeviceType,
source_data: &MemoryType,
dest_data: &mut Memory
) -> Result<(), DeviceError>
Synchronize memory from source_data
to the memory at dest_data
. Read more
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 !=
.