MCPcopy Create free account
hub / github.com/gpujs/gpu.js / _getKernelResultTypeConstructorString

Method _getKernelResultTypeConstructorString

src/backend/cpu/kernel.js:440–457  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

438 }
439
440 _getKernelResultTypeConstructorString() {
441 switch (this.returnType) {
442 case 'LiteralInteger':
443 case 'Number':
444 case 'Integer':
445 case 'Float':
446 return 'Float32Array';
447 case 'Array(2)':
448 case 'Array(3)':
449 case 'Array(4)':
450 return 'Array';
451 default:
452 if (this.graphical) {
453 return 'Float32Array';
454 }
455 throw new Error(`unhandled returnType ${ this.returnType }`);
456 }
457 }
458
459 _resultImmutableKernel1DLoop(kernelString) {
460 const constructorString = this._getKernelResultTypeConstructorString();

Calls

no outgoing calls

Tested by

no test coverage detected