Struct collenchyma::frameworks::cuda::context::Context
[−]
[src]
pub struct Context { /* fields omitted */ }
Defines a Cuda Context.
Methods
impl Context
[src]
fn new(devices: Device) -> Result<Context, DriverError>
Initializes a new Cuda context.
fn from_c(id: *mut Struct_CUctx_st, devices: Vec<Device>) -> Context
Initializes a new Cuda platform from its C type.
fn id(&self) -> isize
Returns the id as isize.
fn id_c(&self) -> *mut Struct_CUctx_st
Returns the id as its C type.
fn synchronize(&self) -> Result<(), DriverError>
Synchronize this Context.
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 Drop for Context
[src]
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: size_t) -> 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 !=
.