Skip to content

Commit 2777e4b

Browse files
committed
bench: resolve lint errors in benchmarks
1 parent 137e31b commit 2777e4b

File tree

874 files changed

+6479
-8546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

874 files changed

+6479
-8546
lines changed

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
/**
3333
* Prints the TAP version.
3434
*/
35-
void print_version( void ) {
35+
static void print_version( void ) {
3636
printf( "TAP version 13\n" );
3737
}
3838

@@ -42,7 +42,7 @@ void print_version( void ) {
4242
* @param total total number of tests
4343
* @param passing total number of passing tests
4444
*/
45-
void print_summary( int total, int passing ) {
45+
static void print_summary( int total, int passing ) {
4646
printf( "#\n" );
4747
printf( "1..%d\n", total ); // TAP plan
4848
printf( "# total %d\n", total );
@@ -57,7 +57,7 @@ void print_summary( int total, int passing ) {
5757
* @param iterations number of iterations
5858
* @param elapsed elapsed time in seconds
5959
*/
60-
void print_results( int iterations, double elapsed ) {
60+
static void print_results( int iterations, double elapsed ) {
6161
double rate = (double)iterations / elapsed;
6262
printf( " ---\n" );
6363
printf( " iterations: %d\n", iterations );
@@ -71,18 +71,18 @@ void print_results( int iterations, double elapsed ) {
7171
*
7272
* @return clock time
7373
*/
74-
double tic( void ) {
74+
static double tic( void ) {
7575
struct timeval now;
7676
gettimeofday( &now, NULL );
7777
return (double)now.tv_sec + (double)now.tv_usec/1.0e6;
7878
}
7979

8080
/**
81-
* Generates a random number on the interval [0,1].
81+
* Generates a random number on the interval [0,1).
8282
*
8383
* @return random number
8484
*/
85-
float rand_float( void ) {
85+
static float rand_float( void ) {
8686
int r = rand();
8787
return (float)r / ( (float)RAND_MAX + 1.0f );
8888
}
@@ -94,7 +94,7 @@ float rand_float( void ) {
9494
* @param len array length
9595
* @return elapsed time in seconds
9696
*/
97-
double benchmark( int iterations, int len ) {
97+
static double benchmark( int iterations, int len ) {
9898
double elapsed;
9999
float x[ len*2 ];
100100
float y[ len*2 ];

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

+7-10
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
* limitations under the License.
1717
*/
1818

19-
/**
20-
* Benchmark `cscal`.
21-
*/
2219
#include "stdlib/blas/base/cscal.h"
2320
#include "stdlib/complex/float32/ctor.h"
2421
#include <stdlib.h>
@@ -36,7 +33,7 @@
3633
/**
3734
* Prints the TAP version.
3835
*/
39-
void print_version( void ) {
36+
static void print_version( void ) {
4037
printf( "TAP version 13\n" );
4138
}
4239

@@ -46,7 +43,7 @@ void print_version( void ) {
4643
* @param total total number of tests
4744
* @param passing total number of passing tests
4845
*/
49-
void print_summary( int total, int passing ) {
46+
static void print_summary( int total, int passing ) {
5047
printf( "#\n" );
5148
printf( "1..%d\n", total ); // TAP plan
5249
printf( "# total %d\n", total );
@@ -61,7 +58,7 @@ void print_summary( int total, int passing ) {
6158
* @param iterations number of iterations
6259
* @param elapsed elapsed time in seconds
6360
*/
64-
void print_results( int iterations, double elapsed ) {
61+
static void print_results( int iterations, double elapsed ) {
6562
double rate = (double)iterations / elapsed;
6663
printf( " ---\n" );
6764
printf( " iterations: %d\n", iterations );
@@ -75,18 +72,18 @@ void print_results( int iterations, double elapsed ) {
7572
*
7673
* @return clock time
7774
*/
78-
double tic( void ) {
75+
static double tic( void ) {
7976
struct timeval now;
8077
gettimeofday( &now, NULL );
8178
return (double)now.tv_sec + (double)now.tv_usec/1.0e6;
8279
}
8380

8481
/**
85-
* Generates a random number on the interval [0,1].
82+
* Generates a random number on the interval [0,1).
8683
*
8784
* @return random number
8885
*/
89-
float rand_float( void ) {
86+
static float rand_float( void ) {
9087
int r = rand();
9188
return (float)r / ( (float)RAND_MAX + 1.0f );
9289
}
@@ -98,7 +95,7 @@ float rand_float( void ) {
9895
* @param len array length
9996
* @return elapsed time in seconds
10097
*/
101-
double benchmark( int iterations, int len ) {
98+
static double benchmark( int iterations, int len ) {
10299
stdlib_complex64_t ca;
103100
float cx[ len*2 ];
104101
double elapsed;

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
/**
3333
* Prints the TAP version.
3434
*/
35-
void print_version( void ) {
35+
static void print_version( void ) {
3636
printf( "TAP version 13\n" );
3737
}
3838

@@ -42,7 +42,7 @@ void print_version( void ) {
4242
* @param total total number of tests
4343
* @param passing total number of passing tests
4444
*/
45-
void print_summary( int total, int passing ) {
45+
static void print_summary( int total, int passing ) {
4646
printf( "#\n" );
4747
printf( "1..%d\n", total ); // TAP plan
4848
printf( "# total %d\n", total );
@@ -57,7 +57,7 @@ void print_summary( int total, int passing ) {
5757
* @param iterations number of iterations
5858
* @param elapsed elapsed time in seconds
5959
*/
60-
void print_results( int iterations, double elapsed ) {
60+
static void print_results( int iterations, double elapsed ) {
6161
double rate = (double)iterations / elapsed;
6262
printf( " ---\n" );
6363
printf( " iterations: %d\n", iterations );
@@ -71,18 +71,18 @@ void print_results( int iterations, double elapsed ) {
7171
*
7272
* @return clock time
7373
*/
74-
double tic( void ) {
74+
static double tic( void ) {
7575
struct timeval now;
7676
gettimeofday( &now, NULL );
7777
return (double)now.tv_sec + (double)now.tv_usec/1.0e6;
7878
}
7979

8080
/**
81-
* Generates a random number on the interval [0,1].
81+
* Generates a random number on the interval [0,1).
8282
*
8383
* @return random number
8484
*/
85-
float rand_float( void ) {
85+
static float rand_float( void ) {
8686
int r = rand();
8787
return (float)r / ( (float)RAND_MAX + 1.0f );
8888
}
@@ -94,7 +94,7 @@ float rand_float( void ) {
9494
* @param len array length
9595
* @return elapsed time in seconds
9696
*/
97-
double benchmark( int iterations, int len ) {
97+
static double benchmark( int iterations, int len ) {
9898
double elapsed;
9999
float x[ len*2 ];
100100
float y[ len*2 ];

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
/**
3333
* Prints the TAP version.
3434
*/
35-
void print_version( void ) {
35+
static void print_version( void ) {
3636
printf( "TAP version 13\n" );
3737
}
3838

@@ -42,7 +42,7 @@ void print_version( void ) {
4242
* @param total total number of tests
4343
* @param passing total number of passing tests
4444
*/
45-
void print_summary( int total, int passing ) {
45+
static void print_summary( int total, int passing ) {
4646
printf( "#\n" );
4747
printf( "1..%d\n", total ); // TAP plan
4848
printf( "# total %d\n", total );
@@ -57,7 +57,7 @@ void print_summary( int total, int passing ) {
5757
* @param iterations number of iterations
5858
* @param elapsed elapsed time in seconds
5959
*/
60-
void print_results( int iterations, double elapsed ) {
60+
static void print_results( int iterations, double elapsed ) {
6161
double rate = (double)iterations / elapsed;
6262
printf( " ---\n" );
6363
printf( " iterations: %d\n", iterations );
@@ -71,18 +71,18 @@ void print_results( int iterations, double elapsed ) {
7171
*
7272
* @return clock time
7373
*/
74-
double tic( void ) {
74+
static double tic( void ) {
7575
struct timeval now;
7676
gettimeofday( &now, NULL );
7777
return (double)now.tv_sec + (double)now.tv_usec/1.0e6;
7878
}
7979

8080
/**
81-
* Generates a random number on the interval [0,1].
81+
* Generates a random number on the interval [0,1).
8282
*
8383
* @return random number
8484
*/
85-
float rand_float( void ) {
85+
static float rand_float( void ) {
8686
int r = rand();
8787
return (float)r / ( (float)RAND_MAX + 1.0f );
8888
}
@@ -94,7 +94,7 @@ float rand_float( void ) {
9494
* @param len array length
9595
* @return elapsed time in seconds
9696
*/
97-
double benchmark( int iterations, int len ) {
97+
static double benchmark( int iterations, int len ) {
9898
double elapsed;
9999
float x[ len*2 ];
100100
float y[ len*2 ];

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
/**
3333
* Prints the TAP version.
3434
*/
35-
void print_version( void ) {
35+
static void print_version( void ) {
3636
printf( "TAP version 13\n" );
3737
}
3838

@@ -42,7 +42,7 @@ void print_version( void ) {
4242
* @param total total number of tests
4343
* @param passing total number of passing tests
4444
*/
45-
void print_summary( int total, int passing ) {
45+
static void print_summary( int total, int passing ) {
4646
printf( "#\n" );
4747
printf( "1..%d\n", total ); // TAP plan
4848
printf( "# total %d\n", total );
@@ -57,7 +57,7 @@ void print_summary( int total, int passing ) {
5757
* @param iterations number of iterations
5858
* @param elapsed elapsed time in seconds
5959
*/
60-
void print_results( int iterations, double elapsed ) {
60+
static void print_results( int iterations, double elapsed ) {
6161
double rate = (double)iterations / elapsed;
6262
printf( " ---\n" );
6363
printf( " iterations: %d\n", iterations );
@@ -71,18 +71,18 @@ void print_results( int iterations, double elapsed ) {
7171
*
7272
* @return clock time
7373
*/
74-
double tic( void ) {
74+
static double tic( void ) {
7575
struct timeval now;
7676
gettimeofday( &now, NULL );
7777
return (double)now.tv_sec + (double)now.tv_usec/1.0e6;
7878
}
7979

8080
/**
81-
* Generates a random number on the interval [0,1].
81+
* Generates a random number on the interval [0,1).
8282
*
8383
* @return random number
8484
*/
85-
double rand_double( void ) {
85+
static double rand_double( void ) {
8686
int r = rand();
8787
return (double)r / ( (double)RAND_MAX + 1.0 );
8888
}
@@ -94,7 +94,7 @@ double rand_double( void ) {
9494
* @param len array length
9595
* @return elapsed time in seconds
9696
*/
97-
double benchmark( int iterations, int len ) {
97+
static double benchmark( int iterations, int len ) {
9898
double elapsed;
9999
double x[ len ];
100100
double y;

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
/**
3333
* Prints the TAP version.
3434
*/
35-
void print_version( void ) {
35+
static void print_version( void ) {
3636
printf( "TAP version 13\n" );
3737
}
3838

@@ -42,7 +42,7 @@ void print_version( void ) {
4242
* @param total total number of tests
4343
* @param passing total number of passing tests
4444
*/
45-
void print_summary( int total, int passing ) {
45+
static void print_summary( int total, int passing ) {
4646
printf( "#\n" );
4747
printf( "1..%d\n", total ); // TAP plan
4848
printf( "# total %d\n", total );
@@ -57,7 +57,7 @@ void print_summary( int total, int passing ) {
5757
* @param iterations number of iterations
5858
* @param elapsed elapsed time in seconds
5959
*/
60-
void print_results( int iterations, double elapsed ) {
60+
static void print_results( int iterations, double elapsed ) {
6161
double rate = (double)iterations / elapsed;
6262
printf( " ---\n" );
6363
printf( " iterations: %d\n", iterations );
@@ -71,18 +71,18 @@ void print_results( int iterations, double elapsed ) {
7171
*
7272
* @return clock time
7373
*/
74-
double tic( void ) {
74+
static double tic( void ) {
7575
struct timeval now;
7676
gettimeofday( &now, NULL );
7777
return (double)now.tv_sec + (double)now.tv_usec/1.0e6;
7878
}
7979

8080
/**
81-
* Generates a random number on the interval [0,1].
81+
* Generates a random number on the interval [0,1).
8282
*
8383
* @return random number
8484
*/
85-
double rand_double( void ) {
85+
static double rand_double( void ) {
8686
int r = rand();
8787
return (double)r / ( (double)RAND_MAX + 1.0 );
8888
}
@@ -94,7 +94,7 @@ double rand_double( void ) {
9494
* @param len array length
9595
* @return elapsed time in seconds
9696
*/
97-
double benchmark( int iterations, int len ) {
97+
static double benchmark( int iterations, int len ) {
9898
double elapsed;
9999
double x[ len ];
100100
double y[ len ];

0 commit comments

Comments
 (0)