(width, height)
| 10 | const a = randomMatrix(size, size); |
| 11 | const b = randomMatrix(size, size); |
| 12 | function randomMatrix(width, height) { |
| 13 | const matrix = new Array(height); |
| 14 | for (let y = 0; y < height; y++) { |
| 15 | const row = matrix[y] = new Float32Array(width); |
| 16 | for (let x = 0; x < width; x++) { |
| 17 | row[x] = Math.random(); |
| 18 | } |
| 19 | } |
| 20 | return matrix; |
| 21 | } |
| 22 | |
| 23 | const gpuKernel = gpu |
| 24 | .createKernel(function(a, b) { |
no outgoing calls
no test coverage detected
searching dependent graphs…