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

Function outputArray

test/features/output.js:6–15  ·  view source on GitHub ↗
(mode)

Source from the content-addressed store, hash-verified

4describe('features: output');
5
6function outputArray(mode) {
7 const gpu = new GPU({ mode });
8 const input = [1,2,3,4,5];
9 const kernel = gpu.createKernel(function(input) {
10 return input[this.thread.x];
11 }, { output: [5] });
12 const result = kernel(input);
13 assert.deepEqual(Array.from(result), input);
14 gpu.destroy();
15}
16
17test('output array auto', () => {
18 outputArray();

Callers 1

output.jsFile · 0.85

Calls 3

createKernelMethod · 0.95
destroyMethod · 0.95
kernelFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…