wgblas
    Preparing search index...

    Module tests/helpers/fixtures

    Property-based fixture runner using fast-check.

    Each routine's fixtures test calls runFixtures with 100 random inputs, comparing the GPU result against the CPU stdlib reference using a routine-specific error metric and threshold.

    buildArb constructs a fast-check arbitrary that produces a complete args object for one test run. Scalar params (n, incx, incy, alpha, c, s) are generated first; vectors x and y are then sized to exactly (n-1)*inc+1 elements so their length is always consistent with the generated n and stride.

    WGSL may flush subnormals to zero: "To flush to zero is to replace a subnormal value for a floating point type with a zero value of that type." (WGSL §15.7.2)

    Filtering generated values for subnormals is not enough — the product of two small-but-normal values can itself land in the subnormal range (e.g. F32_MIN_NORMAL * 5.96e-8 ≈ 7e-46). floatArb uses 1e-3 as the minimum non-zero magnitude, ensuring any pairwise product stays well above F32_MIN_NORMAL (1e-3 × 1e-3 = 1e-6 >> 1.175e-38).

    runFixtures accepts a computeUlp function and a threshold. Each run passes if computeUlp(gpuResult, refResult, args) <= threshold. See tests/index.mjs for the full per-routine table.

    buildArb
    float64Arb
    floatArb
    makeVec
    ndArrayArb
    runFixtures
    scalarArb
    triangularDiagonalArb
    maxUlp → maxUlp
    ulpDiff → ulpDiff