Struct ocl::builders::BufferWriteCmd [] [src]

#[must_use = "commands do nothing unless enqueued"]
pub struct BufferWriteCmd<'c, 'd, T> where
    T: 'c + 'd, 
{ /* fields omitted */ }

A buffer command builder used to enqueue writes.

See SDK docs for more details.

Methods

impl<'c, 'd, T> BufferWriteCmd<'c, 'd, T> where
    T: OclPrm
[src]

Specifies a queue to use for this call only.

Specifies whether or not to block the current thread until completion.

Ignored if this is not a read or write operation.

Default is block = true.

Safety

When performing non-blocking reads or writes, the caller must ensure that the data being read from or written to is not accessed improperly until the command completes. Use events (Event::wait_for) or the command queue (Queue::finish) to synchronize.

If possible, prefer instead to use ::map with ::enq_async for optimal performance and data integrity.

Sets the linear offset for an operation.

Panics

The 'shape' may not have already been set to rectangular by the ::rect function.

Sets an offset into the source data.

Equivalent to setting the start position of a slice into the source data (e.g. src_data[src_offset..]). Use ::len to set the end position (resulting in src_data[dst_offset..len]).

Defaults to 0 if not set. Panics if ::rect has been called.

Sets the total length of data to write.

Equivalent to setting the end position of a slice into the source data (e.g. src_data[..len]). Use ::src_offset to set the start position (resulting in src_data[src_offset..len]).

Defaults to the length of the write source provided. Panics if ::rect has been called.

Specifies that this will be a rectangularly shaped operation (the default being linear).

Row and slice pitches must all be expressed in bytes.

Panics if :offset, src_offset, or ::len have been called.

Specifies a list of events to wait on before the command will run.

Specifies a list of events to wait on before the command will run or resets it to None.

Specifies the destination for a new, optionally created event associated with this command.

Specifies a destination for a new, optionally created event associated with this command or resets it to None.

Enqueues this command, blocking the current thread until it is complete.

If an RwVec is being used as the data destination, the current thread will be blocked until an exclusive lock can be obtained before running the command (which will also block).

Enqueues this command and returns a future representing its completion which resolves to a guard providing exclusive data access usable within subsequent futures.

A data destination container appropriate for an asynchronous operation (such as RwVec) must have been passed to ::write.