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

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(
    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>
[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 format(&self) -> Result<Vec<cl_image_format>>[src]

pub fn element_size(&self) -> Result<size_t>[src]

pub fn row_pitch(&self) -> Result<size_t>[src]

pub fn slice_pitch(&self) -> Result<size_t>[src]

pub fn width(&self) -> Result<size_t>[src]

pub fn height(&self) -> Result<size_t>[src]

pub fn depth(&self) -> Result<size_t>[src]

pub fn array_size(&self) -> Result<size_t>[src]

pub fn buffer(&self) -> Result<cl_mem>[src]

pub fn num_mip_levels(&self) -> Result<cl_uint>[src]

pub fn num_samples(&self) -> Result<cl_uint>[src]

Trait Implementations

impl ClMem for Image[src]

impl Drop for Image[src]

Auto Trait Implementations

impl RefUnwindSafe for Image

impl !Send for Image

impl !Sync for Image

impl Unpin for Image

impl UnwindSafe for Image

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.