(mode)
| 40 | }); |
| 41 | |
| 42 | function balancedTest(mode) { |
| 43 | const gpu = new GPU({ mode }); |
| 44 | const add = gpu.createKernel(function(a, b) { |
| 45 | return a + b; |
| 46 | }) |
| 47 | .setOutput([1]) |
| 48 | .setTactic('balanced'); |
| 49 | let addResult = add(0.1, 0.2)[0]; |
| 50 | assert.equal(addResult.toFixed(7), (0.1 + 0.2).toFixed(7)); |
| 51 | gpu.destroy(); |
| 52 | } |
| 53 | |
| 54 | test('balanced auto', () => { |
| 55 | balancedTest(); |