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

Function speedTest

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

Source from the content-addressed store, hash-verified

4describe('internal: tactic');
5
6function speedTest(mode) {
7 const gpu = new GPU({ mode });
8 const add = gpu.createKernel(function(a, b) {
9 return a + b;
10 })
11 .setOutput([1])
12 .setTactic('speed');
13 let addResult = add(0.1, 0.2)[0];
14 assert.equal(addResult.toFixed(7), (0.1 + 0.2).toFixed(7));
15 gpu.destroy();
16}
17
18test('speed auto', () => {
19 speedTest();

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…