[−][src]Struct opencl3::memory::Image
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]
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>
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
Auto Trait Implementations
impl RefUnwindSafe for Image
[src]
impl !Send for Image
[src]
impl !Sync for Image
[src]
impl Unpin for Image
[src]
impl UnwindSafe for Image
[src]
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,
pub 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, 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.
pub 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>,