Struct fil_ocl::Image[][src]

pub struct Image<T: OclPrm> { /* fields omitted */ }

A section of device memory which represents one or many images.

Use ::builder for an easy way to create. [UNIMPLEMENTED]

Implementations

impl<T: OclPrm> Image<T>[src]

pub fn supported_formats(
    context: &Context,
    flags: MemFlags,
    mem_obj_type: MemObjectType
) -> OclResult<Vec<ImageFormatParseResult>>
[src]

Returns a list of supported image formats.

pub fn builder<'a>() -> ImageBuilder<'a, T>[src]

Returns an ImageBuilder. This is the recommended method to create a new Image.

pub unsafe fn new<'o, Q>(
    que_ctx: Q,
    flags: MemFlags,
    image_format: ImageFormat,
    image_desc: ImageDescriptor,
    host_data: Option<&[T]>
) -> OclResult<Image<T>> where
    Q: Into<QueCtx<'o>>, 
[src]

Returns a new Image.

Prefer ::builder to create a new image.

pub fn from_gl_texture<'o, Q>(
    que_ctx: Q,
    flags: MemFlags,
    image_desc: ImageDescriptor,
    texture_target: GlTextureTarget,
    miplevel: cl_GLint,
    texture: cl_GLuint
) -> OclResult<Image<T>> where
    Q: Into<QueCtx<'o>>, 
[src]

Returns a new Image from an existant GL texture2D/3D.

pub fn from_gl_renderbuffer<'o, Q>(
    que_ctx: Q,
    flags: MemFlags,
    image_desc: ImageDescriptor,
    renderbuffer: cl_GLuint
) -> OclResult<Image<T>> where
    Q: Into<QueCtx<'o>>, 
[src]

Returns a new Image from an existant renderbuffer.

pub fn cmd(&self) -> ImageCmd<'_, T>[src]

Returns an image command builder used to read, write, copy, etc.

Call .enq() to enqueue the command.

See the command builder documentation for more details.

pub fn read<'c, 'd>(&'c self, data: &'d mut [T]) -> ImageCmd<'c, T> where
    'd: 'c, 
[src]

Returns an image command builder set to read.

Call .enq() to enqueue the command.

See the command builder documentation for more details.

pub fn write<'c, 'd>(&'c self, data: &'d [T]) -> ImageCmd<'c, T> where
    'd: 'c, 
[src]

Returns an image command builder set to write.

Call .enq() to enqueue the command.

See the command builder documentation for more details.

pub unsafe fn map<'c>(&'c self) -> ImageMapCmd<'c, T>[src]

Returns a command builder used to map data for reading or writing.

Call .enq() to enqueue the command.

Safety

The caller must ensure that only one mapping of a particular memory region exists at a time.

See the command builder documentation for more details.

pub fn set_default_queue<'a>(&'a mut self, queue: Queue) -> &'a mut Image<T>[src]

Changes the default queue.

Returns a ref for chaining i.e.:

image.set_default_queue(queue).write(....);

[NOTE]: Even when used as above, the queue is changed permanently, not just for the one call. Changing the queue is cheap so feel free to change as often as needed.

The new queue must be associated with a valid device.

pub fn default_queue(&self) -> Option<&Queue>[src]

Returns a reference to the default queue.

pub fn dims(&self) -> &SpatialDims[src]

Returns this image’s dimensions.

pub fn pixel_count(&self) -> usize[src]

Returns the total number of pixels in this image.

pub fn pixel_element_len(&self) -> usize[src]

Returns the length of each pixel element.

pub fn element_count(&self) -> usize[src]

Returns the total number of pixel elements in this image. Equivalent to its length.

pub fn info(&self, info_kind: ImageInfo) -> OclResult<ImageInfoResult>[src]

Get information about this image.

pub fn mem_info(&self, info_kind: MemInfo) -> OclResult<MemInfoResult>[src]

Returns info about this image’s memory.

pub fn as_core(&self) -> &MemCore[src]

Returns a reference to the core pointer wrapper, usable by functions in the core module.

Methods from Deref<Target = MemCore>

pub fn as_ptr(&self) -> *mut c_void[src]

Returns a pointer, do not store it.

Trait Implementations

impl<T: OclPrm> AsMem<T> for Image<T>[src]

impl<T: Clone + OclPrm> Clone for Image<T>[src]

impl<T: Debug + OclPrm> Debug for Image<T>[src]

impl<T: OclPrm> Deref for Image<T>[src]

type Target = MemCore

The resulting type after dereferencing.

impl<T: OclPrm> DerefMut for Image<T>[src]

impl<T: OclPrm> Display for Image<T>[src]

impl<'a, T> MemCmdAll for Image<T> where
    T: OclPrm
[src]

impl<'a, T> MemCmdAll for &'a Image<T> where
    T: OclPrm
[src]

impl<'a, T> MemCmdAll for &'a mut Image<T> where
    T: OclPrm
[src]

impl<'a, T> MemCmdRw for Image<T> where
    T: OclPrm
[src]

impl<'a, T> MemCmdRw for &'a Image<T> where
    T: OclPrm
[src]

impl<'a, T> MemCmdRw for &'a mut Image<T> where
    T: OclPrm
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Image<T> where
    T: RefUnwindSafe

impl<T> Send for Image<T>

impl<T> Sync for Image<T>

impl<T> Unpin for Image<T> where
    T: Unpin

impl<T> UnwindSafe for Image<T> where
    T: UnwindSafe

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.