We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fbf1435 commit 77fac16Copy full SHA for 77fac16
1 file changed
test/index.js
@@ -1,16 +1,26 @@
1
-const test = require('tape'),
+const { GPU } = require('gpu.js'),
2
+ test = require('tape'),
3
index = require('../src/index').benchmark;
4
5
+const gpu = new GPU(),
6
+ cpu = new GPU({ mode: 'cpu' });
7
+
8
test('index.js entry point test', t => {
9
const expectedDefaults = require('../src/util/defaults.json'),
10
expectedNonDefaultOptions = {
11
+ gpu,
12
+ cpu,
13
matrix_size: 1024,
14
num_iterations: 5,
15
logs: false,
16
cpu_benchmark: false
17
};
18
- const options = index().getDataField('options');
19
+ const options = index({
20
21
22
+ gpu: new GPU(),
23
+ }).getDataField('options');
24
const nonDefaultOptions = index(expectedNonDefaultOptions).getDataField('options');
25
26
for (let def in expectedDefaults) {
0 commit comments