[][src]Struct opencl3::memory::Image

pub struct Image { /* fields omitted */ }

An OpenCL image.
Has methods to return information from calls to clGetImageInfo with the appropriate parameters.
Implements the Drop trait to call release_mem_object when the object is dropped.

Implementations

impl Image[src]

pub fn new(image: cl_mem) -> Image[src]

pub fn create<T>(
    context: &Context,
    flags: cl_mem_flags,
    image_format: *const cl_image_format,
    image_desc: *const cl_image_desc,
    host_ptr: *mut c_void
) -> Result<Image, cl_int>
[src]

Create an OpenCL image object for a context.

  • context - a valid OpenCL context.
  • flags - a bit-field used to specify allocation and usage information about the image memory object being created, see: Memory Flags.
  • image_format - a pointer to a structure that describes format properties of the image to be allocated.
  • image_desc - a pointer to a structure that describes type and dimensions of the image to be allocated.
  • host_ptr - a pointer to the image data that may already be allocated by the application.

returns a Result containing the new OpenCL image object or the error code from the OpenCL C API function.

pub fn get(&self) -> cl_mem[src]

pub fn get_format(&self) -> Result<Vec<cl_image_format>, cl_int>[src]

pub fn get_element_size(&self) -> Result<size_t, cl_int>[src]

pub fn get_row_pitch(&self) -> Result<size_t, cl_int>[src]

pub fn get_slice_pitch(&self) -> Result<size_t, cl_int>[src]

pub fn get_width(&self) -> Result<size_t, cl_int>[src]

pub fn get_height(&self) -> Result<size_t, cl_int>[src]

pub fn get_depth(&self) -> Result<size_t, cl_int>[src]

pub fn get_array_size(&self) -> Result<size_t, cl_int>[src]

pub fn get_buffer(&self) -> Result<intptr_t, cl_int>[src]

pub fn get_num_mip_levels(&self) -> Result<cl_uint, cl_int>[src]

pub fn get_num_samples(&self) -> Result<cl_uint, cl_int>[src]

Trait Implementations

impl Drop for Image[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, 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.