[−][src]Struct opencl_core::session::Session
Methods
impl Session
[src]
pub fn create_with_devices<'a, D>(
devices: D,
src: &str,
cq_props: Option<CommandQueueProperties>
) -> Output<Vec<Session>> where
D: Into<VecOrSlice<'a, Device>>,
[src]
devices: D,
src: &str,
cq_props: Option<CommandQueueProperties>
) -> Output<Vec<Session>> where
D: Into<VecOrSlice<'a, Device>>,
pub fn create(
src: &str,
cq_props: Option<CommandQueueProperties>
) -> Output<Vec<Session>>
[src]
src: &str,
cq_props: Option<CommandQueueProperties>
) -> Output<Vec<Session>>
pub fn context(&self) -> Context
[src]
pub fn device(&self) -> Device
[src]
pub fn program(&self) -> Program
[src]
pub fn read_queue(&self) -> RwLockReadGuard<ClCommandQueue>
[src]
pub fn write_queue(&self) -> RwLockWriteGuard<ClCommandQueue>
[src]
pub fn low_level_device(&self) -> &ClDeviceID
[src]
pub fn low_level_context(&self) -> &ClContext
[src]
pub fn low_level_program(&self) -> &ClProgram
[src]
pub fn create_copy(&self) -> Output<Session>
[src]
pub fn create_kernel(&self, kernel_name: &str) -> Output<Kernel>
[src]
Creates a ClKernel from the session's program.
pub fn create_buffer<T: ClNumber, B: BufferCreator<T>>(
&self,
buffer_creator: B
) -> Output<Buffer>
[src]
&self,
buffer_creator: B
) -> Output<Buffer>
Creates a ClMem object in the given context, with the given buffer creator (either a length or some data). This function uses the BufferCreator's implementation to retrieve the appropriate MemConfig.
pub fn create_buffer_with_config<T: ClNumber, B: BufferCreator<T>>(
&self,
buffer_creator: B,
mem_config: MemConfig
) -> Output<Buffer>
[src]
&self,
buffer_creator: B,
mem_config: MemConfig
) -> Output<Buffer>
Creates a ClMem object in the given context, with the given buffer creator (either a length or some data) and a given MemConfig.
pub fn sync_write_buffer<'a, T: ClNumber, H: Into<VecOrSlice<'a, T>>>(
&self,
buffer: &Buffer,
host_buffer: H,
opts: Option<CommandQueueOptions>
) -> Output<()>
[src]
&self,
buffer: &Buffer,
host_buffer: H,
opts: Option<CommandQueueOptions>
) -> Output<()>
This function copies data from the host buffer into the device mem buffer. The host buffer must be a mutable slice or a vector to ensure the safety of the read_Buffer operation.
pub fn sync_read_buffer<'a, T: ClNumber, H: Into<MutVecOrSlice<'a, T>>>(
&self,
buffer: &Buffer,
host_buffer: H,
opts: Option<CommandQueueOptions>
) -> Output<Option<Vec<T>>>
[src]
&self,
buffer: &Buffer,
host_buffer: H,
opts: Option<CommandQueueOptions>
) -> Output<Option<Vec<T>>>
This function copies data from a device mem buffer into a host buffer. The host buffer must be a mutable slice or a vector. For the moment the device mem must also be passed as mutable; I don't trust OpenCL.
pub fn sync_enqueue_kernel(
&self,
kernel: &Kernel,
work: &Work,
opts: Option<CommandQueueOptions>
) -> Output<()>
[src]
&self,
kernel: &Kernel,
work: &Work,
opts: Option<CommandQueueOptions>
) -> Output<()>
This function enqueues a CLKernel into a command queue
Safety
If the ClKernel is not in a usable state or any of the Kernel's dependent object has been release, or the kernel belongs to a different session, or the ClKernel's pointer is a null pointer, then calling this function will cause undefined behavior.
pub fn execute_sync_kernel_operation<'a, T>(
&self,
kernel_op: KernelOperation<'a, T>
) -> Output<()> where
T: ClNumber + KernelArg,
[src]
&self,
kernel_op: KernelOperation<'a, T>
) -> Output<()> where
T: ClNumber + KernelArg,
Trait Implementations
impl Clone for Session
[src]
impl Debug for Session
[src]
impl Drop for Session
[src]
impl Eq for Session
[src]
impl PartialEq<Session> for Session
[src]
impl Send for Session
[src]
impl Sync for Session
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,