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

Method getSubKernelResultType

src/backend/function-builder.js:596–609  ·  view source on GitHub ↗
(index)

Source from the content-addressed store, hash-verified

594 }
595
596 getSubKernelResultType(index) {
597 const subKernelNode = this.subKernelNodes[index];
598 let called = false;
599 for (let functionCallIndex = 0; functionCallIndex < this.rootNode.functionCalls.length; functionCallIndex++) {
600 const functionCall = this.rootNode.functionCalls[functionCallIndex];
601 if (functionCall.ast.callee.name === subKernelNode.name) {
602 called = true;
603 }
604 }
605 if (!called) {
606 throw new Error(`SubKernel ${ subKernelNode.name } never called by kernel`);
607 }
608 return subKernelNode.returnType || subKernelNode.getType(subKernelNode.getJsAST());
609 }
610
611 getReturnTypes() {
612 const result = {

Callers 1

setupReturnTypesMethod · 0.80

Calls 2

getTypeMethod · 0.80
getJsASTMethod · 0.80

Tested by

no test coverage detected