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

Function createArrayKernels

test/features/create-kernel-map.js:20–32  ·  view source on GitHub ↗
(gpu, output)

Source from the content-addressed store, hash-verified

18}
19
20function createArrayKernels(gpu, output) {
21 function add(a1, a2) {
22 return a1 + a2;
23 }
24 function divide(d1, d2) {
25 return d1 / d2;
26 }
27 return gpu.createKernelMap([
28 add, divide
29 ], function (k1, k2, k3) {
30 return divide(add(k1[this.thread.x], k2[this.thread.x]), k3[this.thread.x]);
31 }).setOutput(output)
32}
33
34
35function createKernel(gpu, output) {

Callers 2

createKernelMapArrayAutoFunction · 0.85

Calls 4

createKernelMapMethod · 0.80
divideFunction · 0.70
addFunction · 0.70
setOutputMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…