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

Function add

test/internal/function-composition.js:10–12  ·  view source on GitHub ↗
(left, right)

Source from the content-addressed store, hash-verified

8 const gpu = new GPU({ mode });
9 return gpu.createKernel(function(oneToFour, fourToOne) {
10 function add(left, right) {
11 return left[this.thread.x] + right[this.thread.x];
12 }
13 return add(oneToFour, fourToOne);
14 }, { output: [4] })([1,2,3,4], [4,3,2,1]);
15}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected