[][src]Struct rustacuda::function::GridSize

pub struct GridSize {
    pub x: u32,
    pub y: u32,
    pub z: u32,
}

Dimensions of a grid, or the number of thread blocks in a kernel launch.

Each component of a GridSize must be at least 1. The maximum size depends on your device's compute capability, but maximums of x = (2^31)-1, y = 65535, z = 65535 are common. Launching a kernel with a grid size greater than these limits will cause an error.

Fields

x: u32

Width of grid in blocks

y: u32

Height of grid in blocks

z: u32

Depth of grid in blocks

Methods

impl GridSize[src]

pub fn x(x: u32) -> GridSize[src]

Create a one-dimensional grid of x blocks

pub fn xy(x: u32, y: u32) -> GridSize[src]

Create a two-dimensional grid of x * y blocks

pub fn xyz(x: u32, y: u32, z: u32) -> GridSize[src]

Create a three-dimensional grid of x * y * z blocks

Trait Implementations

impl Clone for GridSize[src]

impl Debug for GridSize[src]

impl Eq for GridSize[src]

impl<'a> From<&'a GridSize> for GridSize[src]

impl From<(u32, u32, u32)> for GridSize[src]

impl From<(u32, u32)> for GridSize[src]

impl From<u32> for GridSize[src]

impl PartialEq<GridSize> for GridSize[src]

impl StructuralEq for GridSize[src]

impl StructuralPartialEq for GridSize[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.