(mode)
| 250 | }); |
| 251 | |
| 252 | function testBitwiseNotSinglePrecision(mode) { |
| 253 | const gpu = new GPU({ mode }); |
| 254 | const kernel = gpu.createKernel(function(v1) { |
| 255 | return ~v1; |
| 256 | }) |
| 257 | .setOutput([1]) |
| 258 | .setPrecision('single'); |
| 259 | |
| 260 | for (let i = 0; i < 10; i++) { |
| 261 | assert.equal(kernel(i)[0], ~i); |
| 262 | } |
| 263 | |
| 264 | gpu.destroy(); |
| 265 | } |
| 266 | |
| 267 | (GPU.isSinglePrecisionSupported ? test : skip)('bitwise NOT single precision auto', () => { |
| 268 | testBitwiseNotSinglePrecision(); |
no test coverage detected
searching dependent graphs…