Skip to content

Commit 86ce5a7

Browse files
committed
docs: make C benchmark functions static
1 parent 28ee850 commit 86ce5a7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/node_modules/@stdlib/_tools/scaffold/math-strided-real-typed-unary/data/benchmark/c/benchmark__length__c.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
/**
3838
* Prints the TAP version.
3939
*/
40-
void print_version() {
40+
static void print_version() {
4141
printf( "TAP version 13\n" );
4242
}
4343

@@ -47,7 +47,7 @@ void print_version() {
4747
* @param total total number of tests
4848
* @param passing total number of passing tests
4949
*/
50-
void print_summary( int total, int passing ) {
50+
static void print_summary( int total, int passing ) {
5151
printf( "#\n" );
5252
printf( "1..%d\n", total ); // TAP plan
5353
printf( "# total %d\n", total );
@@ -62,7 +62,7 @@ void print_summary( int total, int passing ) {
6262
* @param iterations number of iterations
6363
* @param elapsed elapsed time in seconds
6464
*/
65-
void print_results( int iterations, double elapsed ) {
65+
static void print_results( int iterations, double elapsed ) {
6666
double rate = (double)iterations / elapsed;
6767
printf( " ---\n" );
6868
printf( " iterations: %d\n", iterations );
@@ -76,7 +76,7 @@ void print_results( int iterations, double elapsed ) {
7676
*
7777
* @return clock time
7878
*/
79-
double tic() {
79+
static double tic() {
8080
struct timeval now;
8181
gettimeofday( &now, NULL );
8282
return (double)now.tv_sec + (double)now.tv_usec/1.0e6;
@@ -89,7 +89,7 @@ double tic() {
8989
* @param b maximum value
9090
* @return random number
9191
*/
92-
double rand_uniform( double a, double b ) {
92+
static double rand_uniform( double a, double b ) {
9393
double x;
9494
int r;
9595

@@ -106,7 +106,7 @@ double rand_uniform( double a, double b ) {
106106
* @param b maximum value
107107
* @return random number
108108
*/
109-
float rand_uniformf( float a, float b ) {
109+
static float rand_uniformf( float a, float b ) {
110110
return (float)rand_uniform( (double)a, (double)b );
111111
}
112112

@@ -117,7 +117,7 @@ float rand_uniformf( float a, float b ) {
117117
* @param len array length
118118
* @return elapsed time in seconds
119119
*/
120-
double benchmark( int iterations, int len ) {
120+
static double benchmark( int iterations, int len ) {
121121
double elapsed;
122122
{{C_TYPE}} x[ len ];
123123
{{C_TYPE}} y[ len ];

0 commit comments

Comments
 (0)