Struct ocl::Buffer [] [src]

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

A chunk of memory physically located on a device, such as a GPU.

Data is stored remotely in a memory buffer on the device associated with queue.

Methods

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

Creates a new buffer.

flags defaults to flags::MEM_READ_WRITE if None is passed. See the SDK Docs for more information about flags. Note that the host_ptr mentioned in the SDK Docs is equivalent to the slice optionally passed as the data argument. Also note that the names of the flags in this library have the CL_ prefix removed for brevity.

[UNSTABLE]: Arguments may still be in a state of flux.

[UNTESTED] Creates a buffer linked to a previously created OpenGL buffer object.

Errors

Don't forget to .cmd().gl_acquire().enq() before using it and .cmd().gl_release().enq() after.

See the BufferCmd docs for more info.

Returns a buffer command builder used to read, write, copy, etc.

Call .enq() to enqueue the command.

See the BufferCmd docs for more info.

Returns a buffer command builder used to read.

Call .enq() to enqueue the command.

See the BufferCmd docs for more info.

Returns a buffer command builder used to write.

Call .enq() to enqueue the command.

See the BufferCmd docs for more info.

Returns the length of the buffer.

Returns the dimensions of the buffer.

Returns if the Buffer is empty.

Returns info about the underlying memory object.

Changes the default queue used by this Buffer for reads and writes, etc.

Returns a mutable reference for optional chaining i.e.:

Example

buffer.set_default_queue(queue).read(....);

Returns a reference to the default queue.

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

Methods from Deref<Target=MemCore>

Returns a pointer, do not store it.

Trait Implementations

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

Formats the value using the given formatter.

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

The resulting type after dereferencing

The method called to dereference a value

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

The method called to mutably dereference a value

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

Formats the value using the given formatter.