(nativeFunctions, mode)
| 284 | describe('features: Adding nativeFunctions directly on kernel'); |
| 285 | |
| 286 | function testDirectlyOnKernelViaSettings(nativeFunctions, mode) { |
| 287 | const gpu = new GPU({ mode }); |
| 288 | const kernel = gpu.createKernel(function (v) { |
| 289 | return native(v[this.thread.x]); |
| 290 | }, { |
| 291 | output: [1], |
| 292 | nativeFunctions |
| 293 | }); |
| 294 | assert.equal(kernel([1])[0], 2); |
| 295 | gpu.destroy(); |
| 296 | } |
| 297 | |
| 298 | test('via settings auto', () => { |
| 299 | testDirectlyOnKernelViaSettings([ |
no test coverage detected
searching dependent graphs…