[][src]Trait dynamic_ocl::util::OclInfo

pub trait OclInfo: OclInfoInternal {
    fn get_info_raw(&self, param_name: Self::Param) -> Result<Vec<u8>> { ... }
fn get_info_raw_sized<L: ArrayLength<u8>>(
        &self,
        param_name: Self::Param
    ) -> Result<GenericArray<u8, L>> { ... }
fn get_info<T: FromOclInfo>(&self, param_name: Self::Param) -> Result<T>
    where
        Self: Sized
, { ... } }

A trait implemented by OpenCL wrapper types to provide access to OpenCL information functions

Provided methods

fn get_info_raw(&self, param_name: Self::Param) -> Result<Vec<u8>>

Get raw binary info from OpenCL about this object.

This function performs two calls to the underlying clGet___Info function - one to determine the size of the information, and one to read the data once an appropriately-sized vector has been allocated to store it. If the reported size of the data changes between the two calls, Error::InvalidDataLength will be returned.

If the size of the data is known at compile time, get_info_raw_sized should be preferred, as it only requires one call to clGet___Info and does not perform any heap allocations.

fn get_info_raw_sized<L: ArrayLength<u8>>(
    &self,
    param_name: Self::Param
) -> Result<GenericArray<u8, L>>

Get raw binary info from OpenCL about this object, with a constant size.

If the size of the data as reported by OpenCL doesn't match the expected size as specified by the generic parameter, Error::InvalidLength will be returned.

If the size of the data isn't known at compile time, get_info_raw can be used instead.

fn get_info<T: FromOclInfo>(&self, param_name: Self::Param) -> Result<T> where
    Self: Sized

Get information about this object from OpenCL.

This function will automatically convert the data to the type specified by the type parameter, but it's up to the programmer to ensure that this is the appropriate type for the given parameter.

Loading content...

Implementors

impl<T: OclInfoInternal> OclInfo for T[src]

Loading content...