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

Function balancedTest

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

Source from the content-addressed store, hash-verified

40});
41
42function balancedTest(mode) {
43 const gpu = new GPU({ mode });
44 const add = gpu.createKernel(function(a, b) {
45 return a + b;
46 })
47 .setOutput([1])
48 .setTactic('balanced');
49 let addResult = add(0.1, 0.2)[0];
50 assert.equal(addResult.toFixed(7), (0.1 + 0.2).toFixed(7));
51 gpu.destroy();
52}
53
54test('balanced auto', () => {
55 balancedTest();

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…