(mode)
| 217 | }); |
| 218 | |
| 219 | function floatPipelineOutput(mode) { |
| 220 | const gpu = new GPU({ mode }); |
| 221 | const array = [1,2,3,4,5]; |
| 222 | const kernel = gpu.createKernel(function(array) { |
| 223 | return array[this.thread.x]; |
| 224 | }, { |
| 225 | output: [5], |
| 226 | optimizeFloatMemory: true, |
| 227 | precision: 'single', |
| 228 | pipeline: true, |
| 229 | }); |
| 230 | const result = kernel(array).toArray(); |
| 231 | assert.deepEqual(Array.from(result), array); |
| 232 | gpu.destroy(); |
| 233 | } |
| 234 | |
| 235 | (GPU.isSinglePrecisionSupported && GPU.isGPUSupported ? test : skip)('float pipeline output gpu (GPU only)', () => { |
| 236 | floatPipelineOutput('gpu'); |
no test coverage detected
searching dependent graphs…