MCPcopy
hub / github.com/gpujs/gpu.js / toKernelOutput

Method toKernelOutput

src/backend/kernel.js:442–456  ·  view source on GitHub ↗

* * @param {Array|Object} output * @return {number[]}

(output)

Source from the content-addressed store, hash-verified

440 * @return {number[]}
441 */
442 toKernelOutput(output) {
443 if (output.hasOwnProperty('x')) {
444 if (output.hasOwnProperty('y')) {
445 if (output.hasOwnProperty('z')) {
446 return [output.x, output.y, output.z];
447 } else {
448 return [output.x, output.y];
449 }
450 } else {
451 return [output.x];
452 }
453 } else {
454 return output;
455 }
456 }
457
458 /**
459 * @desc Set output dimensions of the kernel function

Callers 2

setOutputMethod · 0.95
setOutputMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected