mirror of
https://github.com/gpujs/gpu.js.git
synced 2026-01-25 16:08:02 +00:00
code review comments
This commit is contained in:
parent
e6471be6a5
commit
c47d1f8a9f
2
dist/backend/web-gl/kernel.js
vendored
2
dist/backend/web-gl/kernel.js
vendored
@ -748,7 +748,7 @@ module.exports = function (_KernelBase) {
|
||||
valuesFlat = new Float32Array(length);
|
||||
utils.flattenTo(value, valuesFlat);
|
||||
} else if (value.constructor != Float32Array) {
|
||||
// TODO: would be great if we could not have to create Float32Array buffers
|
||||
// TODO: Issue #346 would be great if we could not have to create Float32Array buffers
|
||||
// if input is 8/16 bit values...
|
||||
// valuesFlat = new Float32Array(value);
|
||||
valuesFlat = new Float32Array(length);
|
||||
|
||||
@ -1,14 +1,15 @@
|
||||
(function() {
|
||||
function getResult(mode) {
|
||||
|
||||
var A = [
|
||||
[1, 1],
|
||||
[1, 1],
|
||||
[1, 1]
|
||||
[1, 1, 1],
|
||||
[1, 1, 1]
|
||||
];
|
||||
|
||||
var B = [
|
||||
[1, 1, 1],
|
||||
[1, 1, 1]
|
||||
[1, 1],
|
||||
[1, 1],
|
||||
[1, 1]
|
||||
];
|
||||
|
||||
var gpu = new GPU({ mode: mode });
|
||||
@ -26,9 +27,9 @@
|
||||
}, function (a, b) {
|
||||
return multiply(b, a, this.thread.y, this.thread.x);
|
||||
})
|
||||
.setOutput([A.length, B.length]);
|
||||
.setOutput([B.length, A.length]);
|
||||
|
||||
return kernels(B, A).result;
|
||||
return kernels(A, B).result;
|
||||
}
|
||||
QUnit.test( "Issue #96 - param names (auto)", function() {
|
||||
var result = getResult();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user