(mode)
| 86 | }); |
| 87 | |
| 88 | function testBitwiseOrSinglePrecision(mode) { |
| 89 | const gpu = new GPU({ mode }); |
| 90 | const kernel = gpu.createKernel(function(v1, v2) { |
| 91 | return v1 | v2; |
| 92 | }) |
| 93 | .setOutput([1]) |
| 94 | .setPrecision('single'); |
| 95 | |
| 96 | for (let i = 0; i < 10; i++) { |
| 97 | for (let j = 0; j < 10; j++) { |
| 98 | assert.equal(kernel(i, j)[0], i | j); |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | gpu.destroy(); |
| 103 | } |
| 104 | |
| 105 | (GPU.isSinglePrecisionSupported ? test : skip)('bitwise OR single precision auto', () => { |
| 106 | testBitwiseOrSinglePrecision(); |
no test coverage detected
searching dependent graphs…