(fft, mode)
| 4 | describe('issue #564 - boolean handled'); |
| 5 | |
| 6 | function testBooleanHandled(fft, mode) { |
| 7 | const gpu = new GPU({ mode }); |
| 8 | gpu.addNativeFunction('fft', fft, { returnType: 'Array(4)' }); |
| 9 | const kernel = gpu.createKernel( |
| 10 | function(){ |
| 11 | let s = true; |
| 12 | return fft(s); |
| 13 | },{ |
| 14 | output:[1], |
| 15 | } |
| 16 | ); |
| 17 | assert.deepEqual(Array.from(kernel()[0]), [1,1,1,1]); |
| 18 | |
| 19 | gpu.destroy(); |
| 20 | } |
| 21 | |
| 22 | const fft = `vec4 fft (bool horizontal){ |
| 23 | return vec4(1,1,horizontal?1:0,1); |
no test coverage detected
searching dependent graphs…