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§
Trait Implementations§
impl Eq for BlockSize
impl StructuralPartialEq for BlockSize
Auto Trait Implementations§
impl Freeze for BlockSize
impl RefUnwindSafe for BlockSize
impl Send for BlockSize
impl Sync for BlockSize
impl Unpin for BlockSize
impl UnwindSafe for BlockSize
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more