(mode)
| 209 | }); |
| 210 | |
| 211 | function testBitwiseXORUnsignedPrecision(mode) { |
| 212 | const gpu = new GPU({ mode }); |
| 213 | const kernel = gpu.createKernel(function(v1, v2) { |
| 214 | return v1 ^ v2; |
| 215 | }) |
| 216 | .setOutput([1]) |
| 217 | .setPrecision('unsigned'); |
| 218 | |
| 219 | for (let i = 0; i < 10; i++) { |
| 220 | for (let j = 0; j < 10; j++) { |
| 221 | assert.equal(kernel(i, j)[0], i ^ j); |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | gpu.destroy(); |
| 226 | } |
| 227 | |
| 228 | test('bitwise XOR unsigned precision auto', () => { |
| 229 | testBitwiseXORUnsignedPrecision(); |
no test coverage detected
searching dependent graphs…