(mode)
| 402 | describe('features: setFunctions from array on kernel'); |
| 403 | |
| 404 | function 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 | |
| 416 | test('auto', () => { |
| 417 | testSetFunctionsFromArrayOnGPU(); |
no test coverage detected
searching dependent graphs…