Struct ocl::Image
[−]
[src]
pub struct Image<E: OclPrm> { // some fields omitted }
A section of device memory which represents one or many images.
Use ::builder
for an easy way to create. [UNIMPLEMENTED]
Methods
impl<E: OclPrm> Image<E>
[src]
fn supported_formats(context: &Context, flags: MemFlags, mem_obj_type: MemObjectType) -> OclResult<Vec<ImageFormat>>
Returns a list of supported image formats.
fn builder() -> ImageBuilder<E>
Returns an ImageBuilder
. This is the recommended method to create
a new Image
.
fn new(queue: &Queue, flags: MemFlags, image_format: ImageFormat, image_desc: ImageDescriptor, image_data: Option<&[E]>) -> OclResult<Image<E>>
Returns a new Image
.
Prefer ::builder
to create a new image.
fn cmd<'b>(&'b self) -> ImageCmd<'b, E>
Returns an image command builder used to read, write, copy, etc.
Run .enq()
to enqueue the command.
fn read<'b>(&'b self, data: &'b mut [E]) -> ImageCmd<'b, E>
Returns an image command builder set to read.
Run .enq()
to enqueue the command.
fn write<'b>(&'b self, data: &'b [E]) -> ImageCmd<'b, E>
Returns an image command builder set to write.
Run .enq()
to enqueue the command.
fn set_default_queue<'a>(&'a mut self, queue: &Queue) -> &'a mut Image<E>
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.
fn default_queue(&self) -> &Queue
Returns a reference to the default queue.
fn dims(&self) -> &SpatialDims
Returns this image's dimensions.
fn pixel_count(&self) -> usize
Returns the total number of pixels in this image.
fn pixel_element_len(&self) -> usize
Returns the length of each pixel element.
fn element_count(&self) -> usize
Returns the total number of pixel elements in this image. Equivalent to its length.
fn info(&self, info_kind: ImageInfo) -> ImageInfoResult
Get information about this image.
fn mem_info(&self, info_kind: MemInfo) -> MemInfoResult
Returns info about this image's memory.
fn core_as_ref(&self) -> &MemCore
Returns a reference to the core pointer wrapper, usable by functions in
the core
module.
Methods from Deref<Target=MemCore>
Trait Implementations
impl<E: Debug + OclPrm> Debug for Image<E>
[src]
impl<E: Clone + OclPrm> Clone for Image<E>
[src]
fn clone(&self) -> Image<E>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<E: OclPrm> Display for Image<E>
[src]
impl<E: OclPrm> Deref for Image<E>
[src]
type Target = MemCore
The resulting type after dereferencing
fn deref(&self) -> &MemCore
The method called to dereference a value