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]
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>
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]
fn get(&self) -> cl_mem
[src]
fn mem_type(&self) -> Result<cl_mem_object_type>
[src]
fn flags(&self) -> Result<cl_mem_flags>
[src]
fn size(&self) -> Result<size_t>
[src]
fn host_ptr(&self) -> Result<intptr_t>
[src]
fn map_count(&self) -> Result<cl_uint>
[src]
fn reference_count(&self) -> Result<cl_uint>
[src]
fn context(&self) -> Result<cl_context>
[src]
fn associated_memobject(&self) -> Result<cl_mem>
[src]
fn offset(&self) -> Result<size_t>
[src]
fn uses_svm_pointer(&self) -> Result<cl_uint>
[src]
fn properties(&self) -> Result<Vec<cl_ulong>>
[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]
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>,