test for 6030401/3991 too

This commit is contained in:
Nick Hingston 2018-07-26 17:36:12 +01:00
parent 462e4d510f
commit 03077cedd1
6 changed files with 21 additions and 17 deletions

View File

@ -5,7 +5,7 @@
* GPU Accelerated JavaScript
*
* @version 1.5.4
* @date Thu Jul 26 2018 08:57:20 GMT+0100 (BST)
* @date Thu Jul 26 2018 17:35:34 GMT+0100 (BST)
*
* @license MIT
* The MIT License

2
bin/gpu-core.min.js vendored
View File

@ -5,7 +5,7 @@
* GPU Accelerated JavaScript
*
* @version 1.5.4
* @date Thu Jul 26 2018 08:57:20 GMT+0100 (BST)
* @date Thu Jul 26 2018 17:35:34 GMT+0100 (BST)
*
* @license MIT
* The MIT License

View File

@ -5,7 +5,7 @@
* GPU Accelerated JavaScript
*
* @version 1.5.4
* @date Thu Jul 26 2018 08:57:20 GMT+0100 (BST)
* @date Thu Jul 26 2018 17:35:35 GMT+0100 (BST)
*
* @license MIT
* The MIT License
@ -6054,13 +6054,13 @@ var Utils = function (_UtilsCore) {
var GPU = require('../index');
var x = new GPU({
mode: 'webgl-validator'
}).createKernel(function (x, y) {
return x / y;
}).createKernel(function (v1, v2) {
return v1[this.thread.x] / v2[this.thread.x];
}, {
output: [1]
})(6, 3);
})([6, 6030401], [3, 3991]);
_hasIntegerDivisionAccuracyBug = x[0] !== 2;
_hasIntegerDivisionAccuracyBug = x[0] !== 2 || x[1] !== 1511;
return _hasIntegerDivisionAccuracyBug;
}

4
bin/gpu.min.js vendored

File diff suppressed because one or more lines are too long

10
dist/core/utils.js vendored
View File

@ -446,13 +446,15 @@ var Utils = function (_UtilsCore) {
var GPU = require('../index');
var x = new GPU({
mode: 'webgl-validator'
}).createKernel(function (x, y) {
return x / y;
}).createKernel(function (v1, v2) {
return v1[this.thread.x] / v2[this.thread.x];
}, {
output: [1]
})(6, 3);
})([6, 6030401], [3, 3991]);
_hasIntegerDivisionAccuracyBug = x[0] !== 2;
// have we not got whole numbers for 6/3 or 6030401/3991
// add more here if others see this problem
_hasIntegerDivisionAccuracyBug = x[0] !== 2 || x[1] !== 1511;
return _hasIntegerDivisionAccuracyBug;
}

View File

@ -390,13 +390,15 @@ class Utils extends UtilsCore {
const GPU = require('../index');
const x = new GPU({
mode: 'webgl-validator'
}).createKernel(function(x, y) {
return x / y;
}).createKernel(function(v1, v2) {
return v1[this.thread.x] / v2[this.thread.x];
}, {
output: [1]
})(6, 3);
})([6, 6030401], [3, 3991]);
_hasIntegerDivisionAccuracyBug = x[0] !== 2;
// have we not got whole numbers for 6/3 or 6030401/3991
// add more here if others see this problem
_hasIntegerDivisionAccuracyBug = (x[0] !== 2 || x[1] !== 1511);
return _hasIntegerDivisionAccuracyBug;
}