(mode)
| 289 | }); |
| 290 | |
| 291 | function testBitwiseNotUnsignedPrecision(mode) { |
| 292 | const gpu = new GPU({ mode }); |
| 293 | const kernel = gpu.createKernel(function(v1) { |
| 294 | return ~v1; |
| 295 | }) |
| 296 | .setOutput([1]) |
| 297 | .setPrecision('unsigned'); |
| 298 | |
| 299 | for (let i = 0; i < 10; i++) { |
| 300 | assert.equal(kernel(i)[0], ~i); |
| 301 | } |
| 302 | |
| 303 | gpu.destroy(); |
| 304 | } |
| 305 | |
| 306 | test('bitwise NOT unsigned precision auto', () => { |
| 307 | testBitwiseNotUnsignedPrecision(); |
no test coverage detected
searching dependent graphs…