[−][src]Struct opencl_core::Work
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: Dims
global_offset: Option<Dims>
local_size: Option<Dims>
Methods
impl Work
[src]
pub fn new<D>(global_size: D) -> Work where
D: Into<Dims>,
[src]
D: Into<Dims>,
pub fn with_global_offset<D>(self, offset: D) -> Work where
D: Into<Dims>,
[src]
D: Into<Dims>,
pub fn with_local_size<D>(self, local_size: D) -> Work where
D: Into<Dims>,
[src]
D: Into<Dims>,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,