wgblas
    Preparing search index...
    • Calculates the number of workgroups to dispatch, clamped to the device's maxComputeWorkgroupsPerDimension limit (default 65535 across most devices).

      • 1D (pass only rows): returns a single count for dispatchWorkgroups(n).
      • 2D (pass both rows and cols): returns { x, y } for dispatchWorkgroups(x, y). rows maps to the y dimension and cols maps to the x dimension.

      Parameters

      • rows: number

        row count (1D: element count)

      • Optionalcols: number

        column count; omit for a 1D dispatch

      Returns number | { x: number; y: number }

      GPUSupportedLimits (maxComputeWorkgroupsPerDimension)