Skip to content

Commit ff0a6e1

Browse files
bench: update random value generation
PR-URL: #5339 Reviewed-by: Athan Reines <[email protected]>
1 parent 8de7152 commit ff0a6e1

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

lib/node_modules/@stdlib/math/base/special/acosdf/benchmark/benchmark.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench' );
24-
var randu = require( '@stdlib/random/array/uniform' );
24+
var uniform = require( '@stdlib/random/array/uniform' );
2525
var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
2626
var pkg = require( './../package.json' ).name;
2727
var acosdf = require( './../lib' );
@@ -34,7 +34,9 @@ bench( pkg, function benchmark( b ) {
3434
var y;
3535
var i;
3636

37-
x = randu( 100, -1.0, 1.0 );
37+
x = uniform( 100, -1.0, 1.0, {
38+
'dtype': 'float32'
39+
});
3840

3941
b.tic();
4042
for ( i = 0; i < b.iterations; i++ ) {

lib/node_modules/@stdlib/math/base/special/acosdf/benchmark/benchmark.native.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
25-
var randu = require( '@stdlib/random/array/uniform' );
25+
var uniform = require( '@stdlib/random/array/uniform' );
2626
var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
2727
var tryRequire = require( '@stdlib/utils/try-require' );
2828
var pkg = require( './../package.json' ).name;
@@ -43,7 +43,9 @@ bench( pkg+'::native', opts, function benchmark( b ) {
4343
var y;
4444
var i;
4545

46-
x = randu( 100, -1.0, 1.0 );
46+
x = uniform( 100, -1.0, 1.0, {
47+
'dtype': 'float32'
48+
});
4749

4850
b.tic();
4951
for ( i = 0; i < b.iterations; i++ ) {

lib/node_modules/@stdlib/math/base/special/acosdf/benchmark/c/native/benchmark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ static float rand_float( void ) {
9191
*/
9292
static double benchmark( void ) {
9393
double elapsed;
94-
float x[ 100 ];
9594
double t;
95+
float x[ 100 ];
9696
float y;
9797
int i;
9898

0 commit comments

Comments
 (0)