Enum ocl::SimpleDims [] [src]

pub enum SimpleDims {
    Unspecified,
    One(usize),
    Two(usizeusize),
    Three(usizeusizeusize),
}

A simple implementation of a type specifying the sizes of up to three dimensions.

Custom types implementing BufferDims can and should be created to express more complex relationships between buffer and work size.

[FIXME] TODO: Much more explaination needed as soon as conventions solidify. [UNSTABLE]: MAY BE CONSOLIDATED WITH WorkDims.

Variants

UnspecifiedOne(usize)Two(usizeusize)Three(usizeusizeusize)

Methods

impl SimpleDims
[src]

fn new(d0: Option<usize>, d1: Option<usize>, d2: Option<usize>) -> OclResult<SimpleDims>

Returns a new SimpleDims.

Dimensions must be specified in order from d0 -> d1 -> d2; i.e. d1 cannot be Some(x) if d0 is None.

fn dim_count(&self) -> u32

Returns the number of dimensions defined by this SimpleDims.

fn to_size(&self) -> [usize; 3]

fn to_offset(&self) -> [usize; 3]

Trait Implementations

impl Debug for SimpleDims
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for SimpleDims
[src]

fn clone(&self) -> SimpleDims

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 BufferDims for SimpleDims
[src]

fn padded_buffer_len(&self, incr: usize) -> usize

impl WorkDims for SimpleDims
[src]

fn dim_count(&self) -> u32

Returns the number of dimensions defined by this SimpleDims.

fn to_work_size(&self) -> Option<[usize; 3]>

fn to_work_offset(&self) -> Option<[usize; 3]>