[][src]Struct opencl_core::Work

pub struct Work {
    pub global_size: Dims,
    pub global_offset: Option<Dims>,
    pub local_size: Option<Dims>,
}

Work is a representation of 1, 2, or 3 dimensions.

For global_size none of the specified dimensions can be 0.

For global_offset any specficied dimension can be any usize.

For local_size none of the specified dimensions can be 0.

Fields

global_size: Dimsglobal_offset: Option<Dims>local_size: Option<Dims>

Methods

impl Work[src]

pub fn new<D>(global_size: D) -> Work where
    D: Into<Dims>, 
[src]

pub fn with_global_offset<D>(self, offset: D) -> Work where
    D: Into<Dims>, 
[src]

pub fn with_local_size<D>(self, local_size: D) -> Work where
    D: Into<Dims>, 
[src]

pub fn work_dims(&self) -> u32[src]

pub fn global_work_size(&self) -> Result<GlobalWorkSize, Error>[src]

A 3D array that describes the Volume of the Work. A Work's global_work_size must describe a non-zero Volume. For example, [4, 3, 2] is a 4 by 3 by 2 Volume that does not result in an empty volume (4 * 3 * 2 != 0); to drive this point home the Volume [3, 3, 0] is not a valid global_work_size because the product of its elements equal 0.

pub fn global_work_offset(&self) -> GlobalWorkOffset[src]

A 3D array that describes the 3 dimensional offset of the Work. The global_work_size can be None or can be specified as a Dims. Because the global_work_offset describes an of a 3 dimensional collection/buffer the dimensionality of the data can be zero. Some([0, 0, 0]) is a valid global_work_offset.

pub fn local_work_size(&self) -> Result<LocalWorkSize, Error>[src]

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

Trait Implementations

impl Clone for Work[src]

impl Debug for Work[src]

impl Eq for Work[src]

impl PartialEq<Work> for Work[src]

impl StructuralEq for Work[src]

impl StructuralPartialEq for Work[src]

Auto Trait Implementations

impl RefUnwindSafe for Work

impl Send for Work

impl Sync for Work

impl Unpin for Work

impl UnwindSafe for Work

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, 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.