pub struct SharedTile<T, const W: usize, const H: usize> { /* private fields */ }Expand description
A 2D shared memory tile.
This type represents a 2D array in CUDA shared memory. On the CPU side, it’s a zero-sized type that serves as a marker for the transpiler.
§Type Parameters
T- Element type (f32, f64, i32, etc.)W- Tile width (columns)H- Tile height (rows)
§Example
ⓘ
// 16x16 tile of floats
let tile = SharedTile::<f32, 16, 16>::new();
// 32x8 tile for matrix operations
let mat_tile = SharedTile::<f32, 32, 8>::new();Implementations§
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new shared memory tile.
On GPU, this translates to: __shared__ T tile[H][W];
Trait Implementations§
Auto Trait Implementations§
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