Trait ocl::traits::MemLen
[−]
[src]
pub trait MemLen { fn to_len(&self) -> usize; fn to_len_padded(&self, incr: usize) -> usize; fn to_lens(&self) -> [usize; 3]; }
Types which have properties allowing them to be used to define the size of a volume of memory.
Units are expressed in bytes / size_of(T)
just like Vec::len()
.
Required Methods
fn to_len(&self) -> usize
Returns the exact number of elements of a volume of memory
(equivalent to Vec::len()
).
fn to_len_padded(&self, incr: usize) -> usize
Returns the length of a volume of memory padded to the next
multiple of incr
.
fn to_lens(&self) -> [usize; 3]
Returns the exact lengths of each dimension of a volume of memory.
Implementors
impl MemLen for ProQue
impl MemLen for SpatialDims
impl<'a, D> MemLen for &'a D where
D: MemLen,impl<D> MemLen for (D,) where
D: Num + ToPrimitive + Debug + Copy,impl<D> MemLen for [D; 1] where
D: Num + ToPrimitive + Debug + Copy,impl<D> MemLen for (D, D) where
D: Num + ToPrimitive + Debug + Copy,impl<D> MemLen for [D; 2] where
D: Num + ToPrimitive + Debug + Copy,impl<'a, D> MemLen for (D, D, D) where
D: Num + ToPrimitive + Debug + Copy,impl<'a, D> MemLen for [D; 3] where
D: Num + ToPrimitive + Debug + Copy,