pub fn grid_2d(
total_cubes: u32,
limits: &GpuLimits,
) -> Result<(u32, u32), CubeclUtilsErrors>Expand description
Split a flat cube count into a 2D grid within the device’s x/y limits.
Convenience wrapper over grid_2d_limited using the smaller of the
device’s x and y cube-count limits, so the result is valid on either axis.
§Params
total_cubes- Flat number of cubes the dispatch needslimits- Device limits fromGpuLimits::from_client
§Returns
(x, y) with x * y >= total_cubes, or GridTooLarge.