(mode)
| 127 | }); |
| 128 | |
| 129 | function testBitwiseOrUnsignedPrecision(mode) { |
| 130 | const gpu = new GPU({ mode }); |
| 131 | const kernel = gpu.createKernel(function(v1, v2) { |
| 132 | return v1 | v2; |
| 133 | }) |
| 134 | .setOutput([1]) |
| 135 | .setPrecision('unsigned'); |
| 136 | |
| 137 | for (let i = 0; i < 10; i++) { |
| 138 | for (let j = 0; j < 10; j++) { |
| 139 | assert.equal(kernel(i, j)[0], i | j); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | gpu.destroy(); |
| 144 | } |
| 145 | |
| 146 | test('bitwise OR unsigned precision auto', () => { |
| 147 | testBitwiseOrUnsignedPrecision(); |
no test coverage detected
searching dependent graphs…