Skip to content

Commit cac2b94

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

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/node_modules/@stdlib/blas/base/daxpy/benchmark/c/benchmark.length.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ static double benchmark1( int iterations, int len ) {
103103

104104
x = (double *) malloc( len * sizeof( double ) );
105105
y = (double *) malloc( len * sizeof( double ) );
106-
107106
for ( i = 0; i < len; i++ ) {
108107
x[ i ] = ( rand_double()*200.0 ) - 100.0;
109108
y[ i ] = ( rand_double()*200.0 ) - 100.0;
@@ -120,7 +119,6 @@ static double benchmark1( int iterations, int len ) {
120119
if ( y[ 0 ] != y[ 0 ] ) {
121120
printf( "should not return NaN\n" );
122121
}
123-
124122
free( x );
125123
free( y );
126124
return elapsed;
@@ -139,9 +137,9 @@ static double benchmark2( int iterations, int len ) {
139137
double *y;
140138
double t;
141139
int i;
140+
142141
x = (double *) malloc( len * sizeof( double ) );
143142
y = (double *) malloc( len * sizeof( double ) );
144-
145143
for ( i = 0; i < len; i++ ) {
146144
x[ i ] = ( rand_double()*200.0 ) - 100.0;
147145
y[ i ] = ( rand_double()*200.0 ) - 100.0;

0 commit comments

Comments
 (0)