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

Function testSubKernelsLegacyEncoderOff

test/features/legacy-encoder.js:68–82  ·  view source on GitHub ↗
(mode)

Source from the content-addressed store, hash-verified

66});
67
68function testSubKernelsLegacyEncoderOff(mode) {
69 const gpu = new GPU({ mode });
70 function addOne(value) {
71 return value + 1;
72 }
73 const kernel = gpu.createKernelMap([
74 addOne,
75 ], function() {
76 const result = addOne(1);
77 return result + 1;
78 }, { output: [1], precision: 'unsigned' });
79 assert.equal(kernel()[0][0], 2);
80 assert.equal(kernel().result[0], 3);
81 gpu.destroy();
82}
83
84(GPU.isKernelMapSupported ? test : skip)('subKernels off auto', () => {
85 testSubKernelsLegacyEncoderOff();

Callers 1

legacy-encoder.jsFile · 0.85

Calls 4

createKernelMapMethod · 0.95
destroyMethod · 0.95
kernelFunction · 0.85
addOneFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…