Struct 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]
Methods
impl<T: OclPrm> Image<T>
[src]
fn supported_formats(
context: &Context,
flags: MemFlags,
mem_obj_type: MemObjectType
) -> OclResult<Vec<ImageFormatParseResult>>
context: &Context,
flags: MemFlags,
mem_obj_type: MemObjectType
) -> OclResult<Vec<ImageFormatParseResult>>
Returns a list of supported image formats.
fn builder<'a>() -> ImageBuilder<'a, T>
Returns an ImageBuilder
. This is the recommended method to create
a new Image
.
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>>,
que_ctx: Q,
flags: MemFlags,
image_format: ImageFormat,
image_desc: ImageDescriptor,
host_data: Option<&[T]>
) -> OclResult<Image<T>> where
Q: Into<QueCtx<'o>>,
Returns a new Image
.
Prefer ::builder
to create a new image.
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>>,
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>>,
Returns a new Image
from an existant GL texture2D/3D.
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>>,
que_ctx: Q,
flags: MemFlags,
image_desc: ImageDescriptor,
renderbuffer: cl_GLuint
) -> OclResult<Image<T>> where
Q: Into<QueCtx<'o>>,
Returns a new Image
from an existant renderbuffer.
fn cmd(&self) -> ImageCmd<T>
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.
fn read<'c, 'd>(&'c self, data: &'d mut [T]) -> ImageCmd<'c, T> where
'd: 'c,
'd: 'c,
Returns an image command builder set to read.
Call .enq()
to enqueue the command.
See the command builder documentation for more details.
fn write<'c, 'd>(&'c self, data: &'d [T]) -> ImageCmd<'c, T> where
'd: 'c,
'd: 'c,
Returns an image command builder set to write.
Call .enq()
to enqueue the command.
See the command builder documentation for more details.
fn map<'c>(&'c self) -> ImageMapCmd<'c, T>
Returns a command builder used to map data for reading or writing.
Call .enq()
to enqueue the command.
See the command builder documentation for more details.
fn set_default_queue<'a>(&'a mut self, queue: Queue) -> &'a mut Image<T>
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) -> Option<&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
: Use ::core
instead.
Returns a reference to the core pointer wrapper, usable by functions in
the core
module.
fn core(&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<T: Clone + OclPrm> Clone for Image<T>
[src]
fn clone(&self) -> Image<T>
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<T: Debug + OclPrm> Debug for Image<T>
[src]
impl<T: OclPrm> Display for Image<T>
[src]
impl<T: OclPrm> Deref for Image<T>
[src]
type Target = MemCore
The resulting type after dereferencing
fn deref(&self) -> &MemCore
The method called to dereference a value
impl<T: OclPrm> DerefMut for Image<T>
[src]
impl<T: OclPrm> AsMem<T> for Image<T>
[src]
impl<'a, T> MemCmdRw for Image<T> where
T: OclPrm,
[src]
T: OclPrm,
impl<'a, T> MemCmdRw for &'a Image<T> where
T: OclPrm,
[src]
T: OclPrm,
impl<'a, T> MemCmdRw for &'a mut Image<T> where
T: OclPrm,
[src]
T: OclPrm,
impl<'a, T> MemCmdAll for Image<T> where
T: OclPrm,
[src]
T: OclPrm,
impl<'a, T> MemCmdAll for &'a Image<T> where
T: OclPrm,
[src]
T: OclPrm,
impl<'a, T> MemCmdAll for &'a mut Image<T> where
T: OclPrm,
[src]
T: OclPrm,