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

Function testSetFunctionsFromArrayOnGPU

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

Source from the content-addressed store, hash-verified

402describe('features: setFunctions from array on kernel');
403
404function testSetFunctionsFromArrayOnGPU(mode) {
405 const gpu = new GPU({ mode });
406 assert.equal(gpu.setFunctions([function custom() {
407 return 1;
408 }]), gpu);
409 const kernel = gpu.createKernel(function() {
410 return custom();
411 }, { output: [1] });
412 assert.equal(kernel()[0], 1);
413 gpu.destroy();
414}
415
416test('auto', () => {
417 testSetFunctionsFromArrayOnGPU();

Callers 1

Calls 5

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…