(mode)
| 5 | describe('internal: function composition return values'); |
| 6 | |
| 7 | function functionCompositionReturnValuesTest(mode) { |
| 8 | const gpu = new GPU({ mode }); |
| 9 | return gpu.createKernel(function(oneToFour, fourToOne) { |
| 10 | function add(left, right) { |
| 11 | return left[this.thread.x] + right[this.thread.x]; |
| 12 | } |
| 13 | return add(oneToFour, fourToOne); |
| 14 | }, { output: [4] })([1,2,3,4], [4,3,2,1]); |
| 15 | } |
| 16 | |
| 17 | test('auto', () => { |
| 18 | assert.deepEqual(Array.from(functionCompositionReturnValuesTest()), [5,5,5,5]); |
no test coverage detected
searching dependent graphs…