Enum ocl::SimpleDims
[−]
[src]
pub enum SimpleDims { Unspecified, One(usize), Two(usize, usize), Three(usize, usize, usize), }
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
Unspecified
One(usize)
Two(usize, usize)
Three(usize, usize, usize)
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]
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