summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/mozilla/tests/webgpu/webgpu/shader/execution/expression/call/builtin/saturate.cache.js
blob: 5552284c2e40e8b3637eb54027eb3628630454ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/**
* AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts
**/import { FP } from '../../../../../util/floating_point.js';import { linearRange } from '../../../../../util/math.js';import { makeCaseCache } from '../../case_cache.js';

// Cases: [f32|f16|abstract]
const cases = ['f32', 'f16', 'abstract'].
map((trait) => ({
  [`${trait}`]: () => {
    return FP[trait].generateScalarToIntervalCases(
      [...linearRange(0.0, 1.0, 20), ...FP[trait].scalarRange()],
      'unfiltered',
      FP[trait].saturateInterval
    );
  }
})).
reduce((a, b) => ({ ...a, ...b }), {});

export const d = makeCaseCache('saturate', cases);