# Trait ocl::traits::WorkDims [−] [src]

    pub trait WorkDims {
        fn dim_count(&self) -> u32;
        fn to_work_size(&self) -> Option<[usize; 3]>;
        fn to_work_offset(&self) -> Option<[usize; 3]>;
    }

Types which have properties describing the amount of work to be done in multiple dimensions.

## Required Methods

### `fn dim_count(&self) -> u32`

Returns the number of dimensions defined.

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

Returns an array representing the amount of work to be done by a kernel.

Unspecified dimensions (for example, the 3rd dimension in a 1-dimensional work size) are set equal to `1`.

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

Returns an array representing the offset of a work item or memory location.

Unspecified dimensions (for example, the 3rd dimension in a 1-dimensional work size) are set equal to `0`.

## Implementors

- [src]
  `impl WorkDims for ProQue`
- [src]
  `impl WorkDims for SpatialDims`

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)