[][src]Struct opencl_core::session::Session

pub struct Session { /* fields omitted */ }

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]

pub fn create(
    src: &str,
    cq_props: Option<CommandQueueProperties>
) -> Output<Vec<Session>>
[src]

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]

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]

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]

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]

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]

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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.