I just started using the library and even the examples don't work
dokasto opened this issue · 0 comments
dokasto commented
I'm running this
const gpu = new GPU();
const multiplyMatrix = gpu
.createKernel(function (a, b) {
let sum = 0;
for (let i = 0; i < 512; i++) {
sum += a[this.thread.y][i] * b[i][this.thread.x];
}
return sum;
})
.setOutput([512, 512]);
const c = multiplyMatrix(5, 10);
console.log("c", c);
and getting this
gpu-browser.min.js:14 Uncaught (in promise) Error: Error compiling fragment shader: ERROR: 0:461: 'user_aSize' : undeclared identifier
ERROR: 0:461: 'user_aDim' : undeclared identifier
ERROR: 0:461: 'getMemoryOptimized32' : no matching overloaded function found
ERROR: 0:461: 'user_bSize' : undeclared identifier
ERROR: 0:461: 'user_bDim' : undeclared identifier
ERROR: 0:461: 'getMemoryOptimized32' : no matching overloaded function found
�
at WebGL2Kernel.build (gpu-browser.min.js:14:303531)
at WebGL2Kernel.t (gpu-browser.min.js:14:383403)
at r (gpu-browser.min.js:14:383730)
at processPixels ((index):306:21)
at drawToCanvas ((index):392:43)