wgblas
    Preparing search index...

    Function buildArb

    • Builds a fast-check arbitrary that produces a complete args object for one test run.

      Scalar params are generated first from their spec types (integer, float, string). Every ld* field referenced by an array spec's own dependsOn (lda/ldb/ldc, ...) is then chained in [floor, floor + pad], where floor is matrixShape's inner — the same formula ndArrayLen uses to size the backing array, so e.g. lda >= n (row-major) or lda >= m (column-major) is always satisfied. This covers both L2 (one matrix, lda) and Level 3 (multiple independently-shaped matrices, lda/ldb/ldc) routines with a single formula.

      All float32array/float64array params are then sized via ndArrayLen which reads each spec's dependsOn — the same formula used in validation's resolveNdArray. A matrix spec with triangular: true (e.g. for strsv) additionally gets its diagonal patched via triangularDiagonalArb — see diagLow/diagHigh on the spec to override the default band.

      Parameters

      • specs: any

        record of param specs keyed by param name, from loadParam

      • extras: {} = {}

        optional additional arbitraries for routine-specific params (e.g. srotm's param)

      Returns Arbitrary<{ [key: string]: any; [key: number]: any }>

      fast-check arbitrary that generates a complete args object