code review comments

This commit is contained in:
Nick Hingston 2018-07-13 19:59:23 +01:00
parent e6471be6a5
commit c47d1f8a9f
2 changed files with 9 additions and 8 deletions

View File

@ -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);

View File

@ -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();