MCPcopy Create free account
hub / github.com/gpujs/gpu.js / testSetFunctionsFromArrayOnKernel

Function testSetFunctionsFromArrayOnKernel

test/features/add-custom-function.js:365–376  ·  view source on GitHub ↗
(mode)

Source from the content-addressed store, hash-verified

363describe('features: setFunctions from array on kernel');
364
365function testSetFunctionsFromArrayOnKernel(mode) {
366 const gpu = new GPU({ mode });
367 function custom() {
368 return 1;
369 }
370 const kernel = gpu.createKernel(function() {
371 return custom();
372 }, { output: [1] });
373 kernel.setFunctions([custom]);
374 assert.equal(kernel()[0], 1);
375 gpu.destroy();
376}
377
378test('auto', () => {
379 testSetFunctionsFromArrayOnKernel();

Callers 1

Calls 5

createKernelMethod · 0.95
destroyMethod · 0.95
customFunction · 0.85
kernelFunction · 0.85
setFunctionsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…