[][src]Struct rustacuda::function::BlockSize

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

Dimensions of a thread block, or the number of threads in a block.

Each component of a BlockSize must be at least 1. The maximum size depends on your device's compute capability, but maximums of x = 1024, y = 1024, z = 64 are common. In addition, the limit on total number of threads in a block (x * y * z) is also defined by the compute capability, typically 1024. Launching a kernel with a block size greater than these limits will cause an error.

Fields

x: u32

X dimension of each thread block

y: u32

Y dimension of each thread block

z: u32

Z dimension of each thread block

Implementations

impl BlockSize[src]

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

Create a one-dimensional block of x threads

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

Create a two-dimensional block of x * y threads

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

Create a three-dimensional block of x * y * z threads

Trait Implementations

impl Clone for BlockSize[src]

impl Debug for BlockSize[src]

impl Eq for BlockSize[src]

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

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

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

impl From<u32> for BlockSize[src]

impl PartialEq<BlockSize> for BlockSize[src]

impl StructuralEq for BlockSize[src]

impl StructuralPartialEq for BlockSize[src]

Auto Trait Implementations

impl RefUnwindSafe for BlockSize

impl Send for BlockSize

impl Sync for BlockSize

impl Unpin for BlockSize

impl UnwindSafe for BlockSize

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.