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

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§

Create a one-dimensional block of x threads

Create a two-dimensional block of x * y threads

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

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.