mirror of
https://github.com/gpujs/gpu.js.git
synced 2026-01-25 16:08:02 +00:00
test for 6030401/3991 too
This commit is contained in:
parent
462e4d510f
commit
03077cedd1
@ -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
2
bin/gpu-core.min.js
vendored
@ -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
|
||||
|
||||
10
bin/gpu.js
10
bin/gpu.js
@ -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
4
bin/gpu.min.js
vendored
File diff suppressed because one or more lines are too long
10
dist/core/utils.js
vendored
10
dist/core/utils.js
vendored
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user