Skip to content

Commit 0fd55fc

Browse files
authored
Apply suggestions from code review
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
1 parent c76fe84 commit 0fd55fc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • lib/node_modules/@stdlib/blas/ext/base/ssort/benchmark/c/unsorted-random

lib/node_modules/@stdlib/blas/ext/base/ssort/benchmark/c/unsorted-random/benchmark.length.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static double tic( void ) {
8484
*/
8585
static float rand_float( void ) {
8686
int r = rand();
87-
return (float)r / ( (float)RAND_MAX + 1.0 );
87+
return (float)r / ( (float)RAND_MAX + 1.0f );
8888
}
8989

9090
/**
@@ -102,7 +102,7 @@ static double benchmark1( int iterations, int len ) {
102102

103103
x = (float *) malloc( len * sizeof( float ) );
104104
for ( i = 0; i < len; i++ ) {
105-
x[ i ] = ( rand_float()*20.0 ) - 10.0;
105+
x[ i ] = ( rand_float()*20.0f ) - 10.0f;
106106
}
107107
t = tic();
108108
for ( i = 0; i < iterations; i++ ) {
@@ -135,7 +135,7 @@ static double benchmark2( int iterations, int len ) {
135135

136136
x = (float *) malloc( len * sizeof( float ) );
137137
for ( i = 0; i < len; i++ ) {
138-
x[ i ] = ( rand_float()*20.0 ) - 10.0;
138+
x[ i ] = ( rand_float()*20.0f ) - 10.0f;
139139
}
140140
t = tic();
141141
for ( i = 0; i < iterations; i++ ) {
@@ -174,7 +174,7 @@ int main( void ) {
174174
iter = ITERATIONS / pow( 10, i-1 );
175175
for ( j = 0; j < REPEATS; j++ ) {
176176
count += 1;
177-
printf( "# c::%s:unsorted,random:len=%d\n", NAME, len );
177+
printf( "# c::%s::unsorted,random:len=%d\n", NAME, len );
178178
elapsed = benchmark1( iter, len );
179179
print_results( iter, elapsed );
180180
printf( "ok %d benchmark finished\n", count );

0 commit comments

Comments
 (0)