(mode)
| 4 | describe('features: output'); |
| 5 | |
| 6 | function outputArray(mode) { |
| 7 | const gpu = new GPU({ mode }); |
| 8 | const input = [1,2,3,4,5]; |
| 9 | const kernel = gpu.createKernel(function(input) { |
| 10 | return input[this.thread.x]; |
| 11 | }, { output: [5] }); |
| 12 | const result = kernel(input); |
| 13 | assert.deepEqual(Array.from(result), input); |
| 14 | gpu.destroy(); |
| 15 | } |
| 16 | |
| 17 | test('output array auto', () => { |
| 18 | outputArray(); |
no test coverage detected
searching dependent graphs…