(mode)
| 52 | }); |
| 53 | |
| 54 | function testNestedInCustomFunction(mode) { |
| 55 | function custom1() { |
| 56 | function nested1() { |
| 57 | return 1; |
| 58 | } |
| 59 | |
| 60 | return nested1(); |
| 61 | } |
| 62 | const gpu = new GPU({ mode }); |
| 63 | gpu.addFunction(custom1); |
| 64 | const kernel = gpu.createKernel(function() { |
| 65 | return custom1(); |
| 66 | }, { output: [1] }); |
| 67 | assert.deepEqual(kernel(), new Float32Array([1])); |
| 68 | gpu.destroy(); |
| 69 | } |
| 70 | |
| 71 | test('nested in custom auto', () => { |
| 72 | testNestedInCustomFunction(); |
no test coverage detected
searching dependent graphs…