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

Function createPropertyKernels

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

Source from the content-addressed store, hash-verified

3
4describe('features: create kernel map');
5function createPropertyKernels(gpu, output) {
6 function divide(d1, d2) {
7 return d1 / d2;
8 }
9 const adder = alias('adder', function add(a1, a2) {
10 return a1 + a2;
11 });
12 return gpu.createKernelMap({
13 addResult: adder,
14 divideResult: divide
15 }, function (k1, k2, k3) {
16 return divide(adder(k1[this.thread.x], k2[this.thread.x]), k3[this.thread.x]);
17 }).setOutput(output);
18}
19
20function createArrayKernels(gpu, output) {
21 function add(a1, a2) {

Calls 4

aliasFunction · 0.85
createKernelMapMethod · 0.80
divideFunction · 0.70
setOutputMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…