[−][src]Struct open_cl_low_level::object_wrapper::ObjectWrapper
Methods
impl<T: ClObject + RetainRelease + CheckValidClObject> ObjectWrapper<T>
[src]
pub unsafe fn unchecked_new(object: T) -> Self
[src]
pub unsafe fn cl_object(&self) -> T
[src]
pub unsafe fn cl_object_ref(&self) -> &T
[src]
pub unsafe fn cl_object_mut_ref(&mut self) -> &mut T
[src]
pub unsafe fn new(object: T) -> Output<Self>
[src]
pub unsafe fn retain_new(object: T) -> Output<Self>
[src]
pub fn address(&self) -> String
[src]
pub fn type_name(&self) -> &'static str
[src]
impl ObjectWrapper<cl_command_queue>
[src]
pub unsafe fn create(
context: &ClContext,
device: &ClDeviceID,
opt_props: Option<CommandQueueProperties>
) -> Output<ClCommandQueue>
[src]
context: &ClContext,
device: &ClDeviceID,
opt_props: Option<CommandQueueProperties>
) -> Output<ClCommandQueue>
Create a new ClCommandQueue in the given ClContext on the given ClDeviceID with the given CommandQueueProperties (optional).
Safety
Calling this function with an invalid ClContext or ClDeviceID is undefined behavior.
pub unsafe fn create_from_raw_pointers(
context: cl_context,
device: cl_device_id,
props: cl_command_queue_properties
) -> Output<ClCommandQueue>
[src]
context: cl_context,
device: cl_device_id,
props: cl_command_queue_properties
) -> Output<ClCommandQueue>
Creates a ClCommandQueue from raw ClObject pointers.
Safety
Passing an invalid ClObject is undefined behavior.
pub unsafe fn create_copy(&self) -> Output<ClCommandQueue>
[src]
Creates a copy of a ClCommandQueue. The copy is, in fact, a completely differnt ClCommandQueue that has the same cl_context and cl_device_id as the original.
Safety
Calling this function on an invalid ClCommandQueue is undefined behavior.
pub unsafe fn write_buffer<'a, T: ClNumber, H: Into<VecOrSlice<'a, T>>>(
&mut self,
mem: &mut ClMem,
host_buffer: H,
opts: Option<CommandQueueOptions>
) -> Output<ClEvent>
[src]
&mut self,
mem: &mut ClMem,
host_buffer: H,
opts: Option<CommandQueueOptions>
) -> Output<ClEvent>
write_buffer is used to move data from the host buffer (buffer: &[T]) to the mutable OpenCL cl_mem pointer.
pub unsafe fn read_buffer<'a, T: ClNumber, H: Into<MutVecOrSlice<'a, T>>>(
&mut self,
mem: &ClMem,
host_buffer: H,
opts: Option<CommandQueueOptions>
) -> Output<BufferReadEvent<T>>
[src]
&mut self,
mem: &ClMem,
host_buffer: H,
opts: Option<CommandQueueOptions>
) -> Output<BufferReadEvent<T>>
Copies data from a ClMem
pub unsafe fn enqueue_kernel(
&mut self,
kernel: &mut ClKernel,
work: &Work,
opts: Option<CommandQueueOptions>
) -> Output<ClEvent>
[src]
&mut self,
kernel: &mut ClKernel,
work: &Work,
opts: Option<CommandQueueOptions>
) -> Output<ClEvent>
Enqueues a ClKernel onto a the ClCommandQueue.
Safety
Usage of invalid ClObjects is undefined behavior.
pub unsafe fn finish(&mut self) -> Output<()>
[src]
impl ObjectWrapper<*mut _cl_context>
[src]
impl ObjectWrapper<*mut _cl_event>
[src]
pub fn time(&self, info: ProfilingInfo) -> Output<u64>
[src]
pub fn queue_time(&self) -> Output<u64>
[src]
pub fn submit_time(&self) -> Output<u64>
[src]
pub fn start_time(&self) -> Output<u64>
[src]
pub fn end_time(&self) -> Output<u64>
[src]
pub fn profiling(&self) -> Profiling
[src]
pub unsafe fn info<T: Copy>(&self, flag: EventInfo) -> Output<ClPointer<T>>
[src]
pub fn reference_count(&self) -> Output<u32>
[src]
pub unsafe fn cl_command_queue(&self) -> Output<cl_command_queue>
[src]
pub unsafe fn command_queue(&self) -> Output<ClCommandQueue>
[src]
pub unsafe fn cl_context(&self) -> Output<cl_context>
[src]
pub unsafe fn context(&self) -> Output<ClContext>
[src]
pub fn command_execution_status(&self) -> Output<CommandExecutionStatus>
[src]
impl ObjectWrapper<*mut _cl_kernel>
[src]
pub unsafe fn create(program: &ClProgram, name: &str) -> Output<ClKernel>
[src]
Creates a wrapped cl_kernel object.
Safety
Calling this function with an invalid ClProgram is undefined behavior.
pub unsafe fn set_arg<T: KernelArg>(
&mut self,
arg_index: usize,
arg: &mut T
) -> Output<()>
[src]
&mut self,
arg_index: usize,
arg: &mut T
) -> Output<()>
Set adds and arg to a kernel at a given index.
Safety
Calling this function on invalid kernel or with invalid arg
is undefined behavior.
pub unsafe fn set_arg_raw(
&mut self,
arg_index: u32,
arg_size: usize,
arg_ptr: *const c_void
) -> Output<()>
[src]
&mut self,
arg_index: u32,
arg_size: usize,
arg_ptr: *const c_void
) -> Output<()>
impl ObjectWrapper<*mut _cl_program>
[src]
pub unsafe fn create_with_source(
context: &ClContext,
src: &str
) -> Output<ClProgram>
[src]
context: &ClContext,
src: &str
) -> Output<ClProgram>
Creates a new ClProgram on the context and device with the given OpenCL source code.
Safety
The provided ClContext and ClDeviceID must be in valid state or else undefined behavior is expected.
pub unsafe fn create_with_binary(
context: &ClContext,
device: &ClDeviceID,
bin: &[u8]
) -> Output<ClProgram>
[src]
context: &ClContext,
device: &ClDeviceID,
bin: &[u8]
) -> Output<ClProgram>
Creates a new ClProgram on the context and device with the given executable binary.
Safety
The provided ClContext and ClDeviceID must be in valid state or else undefined behavior is expected.
pub fn build<D>(&mut self, devices: &[D]) -> Output<()> where
D: DevicePtr,
[src]
D: DevicePtr,
pub fn get_log<D: DevicePtr>(&self, device: &D) -> Output<String>
[src]
Trait Implementations
impl<T: RetainRelease> Clone for ObjectWrapper<T>
[src]
fn clone(&self) -> ObjectWrapper<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl CommandQueuePtr for ObjectWrapper<cl_command_queue>
[src]
unsafe fn command_queue_ptr(&self) -> cl_command_queue
[src]
fn address(&self) -> String
[src]
unsafe fn info<T: Copy>(&self, flag: CQInfo) -> Output<ClPointer<T>>
[src]
unsafe fn cl_context(&self) -> Output<cl_context>
[src]
unsafe fn context(&self) -> Output<ClContext>
[src]
unsafe fn cl_device_id(&self) -> Output<cl_device_id>
[src]
unsafe fn device(&self) -> Output<ClDeviceID>
[src]
unsafe fn reference_count(&self) -> Output<u32>
[src]
unsafe fn cl_command_queue_properties(
&self
) -> Output<cl_command_queue_properties>
[src]
&self
) -> Output<cl_command_queue_properties>
unsafe fn properties(&self) -> Output<CommandQueueProperties>
[src]
impl<T: ClObject + RetainRelease> Debug for ObjectWrapper<T>
[src]
impl<T: RetainRelease> Drop for ObjectWrapper<T>
[src]
impl<T: ClObject + RetainRelease> Eq for ObjectWrapper<T>
[src]
impl<T: ClObject + RetainRelease> PartialEq<ObjectWrapper<T>> for ObjectWrapper<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for ObjectWrapper<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for ObjectWrapper<T> where
T: Send,
T: Send,
impl<T> Sync for ObjectWrapper<T> where
T: Sync,
T: Sync,
impl<T> Unpin for ObjectWrapper<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for ObjectWrapper<T> where
T: UnwindSafe,
T: UnwindSafe,
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>,