MCPcopy Index your code
hub / github.com/gpujs/gpu.js / floatPipelineOutput

Function floatPipelineOutput

test/features/optimize-float-memory.js:219–233  ·  view source on GitHub ↗
(mode)

Source from the content-addressed store, hash-verified

217});
218
219function 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');

Callers 1

Calls 4

createKernelMethod · 0.95
destroyMethod · 0.95
kernelFunction · 0.85
toArrayMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…