MCPcopy Index your code
hub / github.com/gpujs/gpu.js / precisionTest

Function precisionTest

test/features/tactic.js:78–88  ·  view source on GitHub ↗
(mode)

Source from the content-addressed store, hash-verified

76});
77
78function precisionTest(mode) {
79 const gpu = new GPU({ mode });
80 const add = gpu.createKernel(function(a, b) {
81 return a + b;
82 })
83 .setOutput([1])
84 .setTactic('precision');
85 let addResult = add(0.1, 0.2)[0];
86 assert.equal(addResult.toFixed(7), (0.1 + 0.2).toFixed(7));
87 gpu.destroy();
88}
89
90test('precision auto', () => {
91 precisionTest();

Callers 1

tactic.jsFile · 0.85

Calls 5

createKernelMethod · 0.95
destroyMethod · 0.95
setTacticMethod · 0.80
addFunction · 0.70
setOutputMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…