From 4e6009c04d8d5c06fdaa76a37d6af4cee2c1461a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 31 Jul 2024 22:06:34 +0000 Subject: [PATCH] Auto-generated commit --- .gitignore | 2 + CHANGELOG.md | 14 +- .../benchmark/c/benchmark.c | 19 +-- .../benchmark/c/benchmark.c | 19 +-- .../benchmark/c/benchmark.c | 19 +-- .../benchmark/c/benchmark.c | 19 +-- .../is-column-major/benchmark/c/benchmark.c | 19 +-- .../is-contiguous/benchmark/c/benchmark.c | 19 +-- .../benchmark/c/benchmark.c | 19 +-- .../benchmark/c/benchmark.c | 19 +-- .../is-row-major/benchmark/c/benchmark.c | 19 +-- .../benchmark/c/benchmark.c | 19 +-- .../benchmark/c/benchmark.c | 19 +-- .../benchmark/c/benchmark.c | 19 +-- base/bind2vind/benchmark/c/benchmark.c | 49 +++--- base/broadcast-shapes/benchmark/c/benchmark.c | 27 ++-- .../bytes-per-element/benchmark/c/benchmark.c | 21 ++- base/clamp-index/benchmark/c/benchmark.c | 19 +-- base/dtype-char/benchmark/c/benchmark.c | 21 ++- base/for-each/lib/nd.js | 2 +- base/for-each/lib/nd_accessors.js | 2 +- base/ind/benchmark/c/benchmark.c | 25 ++- base/ind2sub/benchmark/c/benchmark.c | 49 +++--- base/iteration-order/benchmark/c/benchmark.c | 19 +-- .../benchmark/c/benchmark.c | 19 +-- .../benchmark/c/benchmark.c | 19 +-- .../benchmark/c/benchmark.c | 19 +-- .../benchmark/c/benchmark.c | 19 +-- base/normalize-index/benchmark/c/benchmark.c | 19 +-- base/numel/benchmark/c/benchmark.c | 19 +-- base/shape2strides/benchmark/c/benchmark.c | 21 ++- .../benchmark/c/benchmark.c | 19 +-- base/strides2offset/benchmark/c/benchmark.c | 19 +-- base/strides2order/benchmark/c/benchmark.c | 19 +-- base/sub2ind/benchmark/c/benchmark.c | 41 +++-- base/vind2bind/benchmark/c/benchmark.c | 49 +++--- base/wrap-index/benchmark/c/benchmark.c | 19 +-- ctor/benchmark/c/benchmark.c | 145 +++++++++--------- 38 files changed, 418 insertions(+), 506 deletions(-) diff --git a/.gitignore b/.gitignore index 49b206b8..4fdc97c0 100644 --- a/.gitignore +++ b/.gitignore @@ -101,6 +101,8 @@ docs/**/node_modules/ pids *.pid *.seed +yarn.lock +package-lock.json # Typescript # ############## diff --git a/CHANGELOG.md b/CHANGELOG.md index 724498df..36d34fcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@
-## Unreleased (2024-07-27) +## Unreleased (2024-07-31)
@@ -260,6 +260,16 @@ +
+ +##### Bug Fixes + +- [`c57d1d8`](https://github.com/stdlib-js/stdlib/commit/c57d1d880a32cfaff0c57744c81ef641640cddef) - return subscripts from perspective of ndarray view, not buffer + +
+ + +
@@ -805,6 +815,8 @@ A total of 4 people contributed to this release. Thank you to the following cont
+- [`c57d1d8`](https://github.com/stdlib-js/stdlib/commit/c57d1d880a32cfaff0c57744c81ef641640cddef) - **fix:** return subscripts from perspective of ndarray view, not buffer _(by Athan Reines)_ +- [`2777e4b`](https://github.com/stdlib-js/stdlib/commit/2777e4be161869d09406e3b17947d24c64b47af2) - **bench:** resolve lint errors in benchmarks _(by Athan Reines)_ - [`6e4b9eb`](https://github.com/stdlib-js/stdlib/commit/6e4b9ebc31d9629446019e37e31bfe9b180b675c) - **feat:** update namespace TypeScript declarations [(#2681)](https://github.com/stdlib-js/stdlib/pull/2681) _(by stdlib-bot, Philipp Burckhardt)_ - [`7ee91a5`](https://github.com/stdlib-js/stdlib/commit/7ee91a531462ec823da632c6ae8ff65a8d16549e) - **docs:** update namespace table of contents [(#2674)](https://github.com/stdlib-js/stdlib/pull/2674) _(by stdlib-bot, Athan Reines)_ - [`d31e751`](https://github.com/stdlib-js/stdlib/commit/d31e7515b71dc5b76751173c7724d73d943b1473) - **feat:** add `forEach` to namespace _(by Athan Reines)_ diff --git a/base/assert/is-allowed-data-type-cast/benchmark/c/benchmark.c b/base/assert/is-allowed-data-type-cast/benchmark/c/benchmark.c index 9cab12f5..adf32a22 100644 --- a/base/assert/is-allowed-data-type-cast/benchmark/c/benchmark.c +++ b/base/assert/is-allowed-data-type-cast/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `is_allowed_data_type_cast`. -*/ #include "stdlib/ndarray/base/assert/is_allowed_data_type_cast.h" #include "stdlib/ndarray/casting_modes.h" #include "stdlib/ndarray/dtypes.h" @@ -36,7 +33,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -46,7 +43,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -60,7 +57,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -74,18 +71,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -95,7 +92,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int8_t b; double t; diff --git a/base/assert/is-buffer-length-compatible-shape/benchmark/c/benchmark.c b/base/assert/is-buffer-length-compatible-shape/benchmark/c/benchmark.c index ba4aa5e1..8dc87f32 100644 --- a/base/assert/is-buffer-length-compatible-shape/benchmark/c/benchmark.c +++ b/base/assert/is-buffer-length-compatible-shape/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `is_buffer_length_compatible_shape`. -*/ #include "stdlib/ndarray/base/assert/is_buffer_length_compatible_shape.h" #include #include @@ -34,7 +31,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -44,7 +41,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -58,7 +55,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -72,18 +69,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -93,7 +90,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int8_t b; double t; diff --git a/base/assert/is-buffer-length-compatible/benchmark/c/benchmark.c b/base/assert/is-buffer-length-compatible/benchmark/c/benchmark.c index 69afd6f3..023463e5 100644 --- a/base/assert/is-buffer-length-compatible/benchmark/c/benchmark.c +++ b/base/assert/is-buffer-length-compatible/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `is_buffer_length_compatible`. -*/ #include "stdlib/ndarray/base/assert/is_buffer_length_compatible.h" #include "stdlib/ndarray/dtypes.h" #include @@ -35,7 +32,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -45,7 +42,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -59,7 +56,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -73,18 +70,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -94,7 +91,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int8_t b; double t; diff --git a/base/assert/is-column-major-contiguous/benchmark/c/benchmark.c b/base/assert/is-column-major-contiguous/benchmark/c/benchmark.c index 7f93833d..13ac1988 100644 --- a/base/assert/is-column-major-contiguous/benchmark/c/benchmark.c +++ b/base/assert/is-column-major-contiguous/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `is_column_major_contiguous`. -*/ #include "stdlib/ndarray/base/assert/is_column_major_contiguous.h" #include "stdlib/ndarray/dtypes.h" #include @@ -35,7 +32,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -45,7 +42,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -59,7 +56,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -73,18 +70,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -94,7 +91,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int8_t b; double t; diff --git a/base/assert/is-column-major/benchmark/c/benchmark.c b/base/assert/is-column-major/benchmark/c/benchmark.c index deaa5e1a..5a2d6fd3 100644 --- a/base/assert/is-column-major/benchmark/c/benchmark.c +++ b/base/assert/is-column-major/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `is_column_major`. -*/ #include "stdlib/ndarray/base/assert/is_column_major.h" #include #include @@ -34,7 +31,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -44,7 +41,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -58,7 +55,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -72,18 +69,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -93,7 +90,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int8_t b; double t; diff --git a/base/assert/is-contiguous/benchmark/c/benchmark.c b/base/assert/is-contiguous/benchmark/c/benchmark.c index 346293b4..b1431d03 100644 --- a/base/assert/is-contiguous/benchmark/c/benchmark.c +++ b/base/assert/is-contiguous/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `is_contiguous`. -*/ #include "stdlib/ndarray/base/assert/is_contiguous.h" #include "stdlib/ndarray/dtypes.h" #include @@ -35,7 +32,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -45,7 +42,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -59,7 +56,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -73,18 +70,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -94,7 +91,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int8_t b; double t; diff --git a/base/assert/is-mostly-safe-data-type-cast/benchmark/c/benchmark.c b/base/assert/is-mostly-safe-data-type-cast/benchmark/c/benchmark.c index 7ea81ce0..853e8b38 100644 --- a/base/assert/is-mostly-safe-data-type-cast/benchmark/c/benchmark.c +++ b/base/assert/is-mostly-safe-data-type-cast/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `is_mostly_safe_data_type_cast`. -*/ #include "stdlib/ndarray/base/assert/is_mostly_safe_data_type_cast.h" #include "stdlib/ndarray/dtypes.h" #include @@ -35,7 +32,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -45,7 +42,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -59,7 +56,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -73,18 +70,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -94,7 +91,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int8_t b; double t; diff --git a/base/assert/is-row-major-contiguous/benchmark/c/benchmark.c b/base/assert/is-row-major-contiguous/benchmark/c/benchmark.c index 8df7af67..d647a461 100644 --- a/base/assert/is-row-major-contiguous/benchmark/c/benchmark.c +++ b/base/assert/is-row-major-contiguous/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `is_row_major_contiguous`. -*/ #include "stdlib/ndarray/base/assert/is_row_major_contiguous.h" #include "stdlib/ndarray/dtypes.h" #include @@ -35,7 +32,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -45,7 +42,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -59,7 +56,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -73,18 +70,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -94,7 +91,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int8_t b; double t; diff --git a/base/assert/is-row-major/benchmark/c/benchmark.c b/base/assert/is-row-major/benchmark/c/benchmark.c index 090dd37a..0c7b6311 100644 --- a/base/assert/is-row-major/benchmark/c/benchmark.c +++ b/base/assert/is-row-major/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `is_row_major`. -*/ #include "stdlib/ndarray/base/assert/is_row_major.h" #include #include @@ -34,7 +31,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -44,7 +41,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -58,7 +55,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -72,18 +69,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -93,7 +90,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int8_t b; double t; diff --git a/base/assert/is-safe-data-type-cast/benchmark/c/benchmark.c b/base/assert/is-safe-data-type-cast/benchmark/c/benchmark.c index 99a6cb52..661d80c8 100644 --- a/base/assert/is-safe-data-type-cast/benchmark/c/benchmark.c +++ b/base/assert/is-safe-data-type-cast/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `is_safe_data_type_cast`. -*/ #include "stdlib/ndarray/base/assert/is_safe_data_type_cast.h" #include "stdlib/ndarray/dtypes.h" #include @@ -35,7 +32,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -45,7 +42,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -59,7 +56,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -73,18 +70,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -94,7 +91,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int8_t b; double t; diff --git a/base/assert/is-same-kind-data-type-cast/benchmark/c/benchmark.c b/base/assert/is-same-kind-data-type-cast/benchmark/c/benchmark.c index 14830927..1d1434bd 100644 --- a/base/assert/is-same-kind-data-type-cast/benchmark/c/benchmark.c +++ b/base/assert/is-same-kind-data-type-cast/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `is_same_kind_data_type_cast`. -*/ #include "stdlib/ndarray/base/assert/is_same_kind_data_type_cast.h" #include "stdlib/ndarray/dtypes.h" #include @@ -35,7 +32,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -45,7 +42,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -59,7 +56,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -73,18 +70,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -94,7 +91,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int8_t b; double t; diff --git a/base/assert/is-single-segment-compatible/benchmark/c/benchmark.c b/base/assert/is-single-segment-compatible/benchmark/c/benchmark.c index 0ded46a4..c0c61068 100644 --- a/base/assert/is-single-segment-compatible/benchmark/c/benchmark.c +++ b/base/assert/is-single-segment-compatible/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `is_single_segment_compatible`. -*/ #include "stdlib/ndarray/base/assert/is_single_segment_compatible.h" #include "stdlib/ndarray/dtypes.h" #include @@ -35,7 +32,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -45,7 +42,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -59,7 +56,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -73,18 +70,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -94,7 +91,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int8_t b; double t; diff --git a/base/bind2vind/benchmark/c/benchmark.c b/base/bind2vind/benchmark/c/benchmark.c index 55eac1f8..6abc862b 100644 --- a/base/bind2vind/benchmark/c/benchmark.c +++ b/base/bind2vind/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `bind2vind`. -*/ #include "stdlib/ndarray/base/bind2vind.h" #include "stdlib/ndarray/orders.h" #include "stdlib/ndarray/index_modes.h" @@ -36,7 +33,7 @@ /** * Prints the TAP version. */ -void print_version( void ) { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -46,7 +43,7 @@ void print_version( void ) { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -60,7 +57,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -74,18 +71,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic( void ) { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double( void ) { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -95,7 +92,7 @@ double rand_double( void ) { * * @return elapsed time in seconds */ -double benchmark1( void ) { +static double benchmark1( void ) { double elapsed; int64_t idx; int64_t ind; @@ -129,7 +126,7 @@ double benchmark1( void ) { * * @return elapsed time in seconds */ -double benchmark2( void ) { +static double benchmark2( void ) { double elapsed; int64_t idx; int64_t ind; @@ -163,7 +160,7 @@ double benchmark2( void ) { * * @return elapsed time in seconds */ -double benchmark3( void ) { +static double benchmark3( void ) { double elapsed; int64_t idx; int64_t ind; @@ -197,7 +194,7 @@ double benchmark3( void ) { * * @return elapsed time in seconds */ -double benchmark4( void ) { +static double benchmark4( void ) { double elapsed; int64_t idx; int64_t ind; @@ -231,7 +228,7 @@ double benchmark4( void ) { * * @return elapsed time in seconds */ -double benchmark5( void ) { +static double benchmark5( void ) { double elapsed; int64_t idx; int64_t ind; @@ -265,7 +262,7 @@ double benchmark5( void ) { * * @return elapsed time in seconds */ -double benchmark6( void ) { +static double benchmark6( void ) { double elapsed; int64_t idx; int64_t ind; @@ -299,7 +296,7 @@ double benchmark6( void ) { * * @return elapsed time in seconds */ -double benchmark7( void ) { +static double benchmark7( void ) { double elapsed; int64_t idx; int64_t ind; @@ -333,7 +330,7 @@ double benchmark7( void ) { * * @return elapsed time in seconds */ -double benchmark8( void ) { +static double benchmark8( void ) { double elapsed; int64_t idx; int64_t ind; @@ -367,7 +364,7 @@ double benchmark8( void ) { * * @return elapsed time in seconds */ -double benchmark9( void ) { +static double benchmark9( void ) { double elapsed; int64_t idx; int64_t ind; @@ -401,7 +398,7 @@ double benchmark9( void ) { * * @return elapsed time in seconds */ -double benchmark10( void ) { +static double benchmark10( void ) { double elapsed; int64_t idx; int64_t ind; @@ -435,7 +432,7 @@ double benchmark10( void ) { * * @return elapsed time in seconds */ -double benchmark11( void ) { +static double benchmark11( void ) { double elapsed; int64_t idx; int64_t ind; @@ -469,7 +466,7 @@ double benchmark11( void ) { * * @return elapsed time in seconds */ -double benchmark12( void ) { +static double benchmark12( void ) { double elapsed; int64_t idx; int64_t ind; @@ -503,7 +500,7 @@ double benchmark12( void ) { * * @return elapsed time in seconds */ -double benchmark13( void ) { +static double benchmark13( void ) { double elapsed; int64_t idx; int64_t ind; @@ -537,7 +534,7 @@ double benchmark13( void ) { * * @return elapsed time in seconds */ -double benchmark14( void ) { +static double benchmark14( void ) { double elapsed; int64_t idx; int64_t ind; @@ -571,7 +568,7 @@ double benchmark14( void ) { * * @return elapsed time in seconds */ -double benchmark15( void ) { +static double benchmark15( void ) { double elapsed; int64_t idx; int64_t ind; @@ -605,7 +602,7 @@ double benchmark15( void ) { * * @return elapsed time in seconds */ -double benchmark16( void ) { +static double benchmark16( void ) { double elapsed; int64_t idx; int64_t ind; diff --git a/base/broadcast-shapes/benchmark/c/benchmark.c b/base/broadcast-shapes/benchmark/c/benchmark.c index be62cd57..82d2be57 100644 --- a/base/broadcast-shapes/benchmark/c/benchmark.c +++ b/base/broadcast-shapes/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `broadcast_shapes`. -*/ #include "stdlib/ndarray/base/broadcast_shapes.h" #include #include @@ -34,7 +31,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -44,7 +41,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -58,7 +55,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -72,18 +69,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -93,17 +90,17 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int8_t status; double t; int i; - int64_t sh1[] = { 8, 1, 6, 1 }; - int64_t sh2[] = { 7, 1, 5 }; + const int64_t sh1[] = { 8, 1, 6, 1 }; + const int64_t sh2[] = { 7, 1, 5 }; - int64_t ndims[] = { 4, 3 }; - int64_t *shapes[] = { sh1, sh2 }; + const int64_t ndims[] = { 4, 3 }; + const int64_t *shapes[] = { sh1, sh2 }; int64_t out[] = { 0, 0, 0, 0 }; diff --git a/base/bytes-per-element/benchmark/c/benchmark.c b/base/bytes-per-element/benchmark/c/benchmark.c index ac19d827..370018a3 100644 --- a/base/bytes-per-element/benchmark/c/benchmark.c +++ b/base/bytes-per-element/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `bytes_per_element`. -*/ #include "stdlib/ndarray/base/bytes_per_element.h" #include "stdlib/ndarray/dtypes.h" #include @@ -35,7 +32,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -45,7 +42,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -59,7 +56,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -73,18 +70,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -94,13 +91,13 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int64_t nbytes; double t; int i; - int dtypes[ 8 ] = { + const int dtypes[ 8 ] = { STDLIB_NDARRAY_INT8, STDLIB_NDARRAY_UINT8, STDLIB_NDARRAY_INT16, diff --git a/base/clamp-index/benchmark/c/benchmark.c b/base/clamp-index/benchmark/c/benchmark.c index d1dd152a..acbd94e1 100644 --- a/base/clamp-index/benchmark/c/benchmark.c +++ b/base/clamp-index/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `clamp_index`. -*/ #include "stdlib/ndarray/base/clamp_index.h" #include #include @@ -34,7 +31,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -44,7 +41,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -58,7 +55,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -72,18 +69,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -93,7 +90,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int64_t idx; int64_t max; diff --git a/base/dtype-char/benchmark/c/benchmark.c b/base/dtype-char/benchmark/c/benchmark.c index c3df8135..af8a87bf 100644 --- a/base/dtype-char/benchmark/c/benchmark.c +++ b/base/dtype-char/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `dtype_char`. -*/ #include "stdlib/ndarray/base/dtype_char.h" #include "stdlib/ndarray/dtypes.h" #include @@ -35,7 +32,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -45,7 +42,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -59,7 +56,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -73,18 +70,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -94,13 +91,13 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; uint8_t ch; double t; int i; - int dtypes[ 8 ] = { + const int dtypes[ 8 ] = { STDLIB_NDARRAY_INT8, STDLIB_NDARRAY_UINT8, STDLIB_NDARRAY_INT16, diff --git a/base/for-each/lib/nd.js b/base/for-each/lib/nd.js index f0855e6a..75463051 100644 --- a/base/for-each/lib/nd.js +++ b/base/for-each/lib/nd.js @@ -110,7 +110,7 @@ function forEachnd( x, fcn, thisArg ) { // Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory... for ( i = 0; i < len; i++ ) { ix = vind2bind( sh, sx, ox, ordx, i, MODE ); - idx = ind2sub( sh, sx, ox, ordx, i, MODE ); + idx = ind2sub( sh, sx, 0, ordx, i, MODE ); // return subscripts from the perspective of the ndarray view fcn.call( thisArg, xbuf[ ix ], idx, x.ref ); } } diff --git a/base/for-each/lib/nd_accessors.js b/base/for-each/lib/nd_accessors.js index d5d115a5..8e5842be 100644 --- a/base/for-each/lib/nd_accessors.js +++ b/base/for-each/lib/nd_accessors.js @@ -128,7 +128,7 @@ function forEachnd( x, fcn, thisArg ) { // Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory... for ( i = 0; i < len; i++ ) { ix = vind2bind( sh, sx, ox, ordx, i, MODE ); - idx = ind2sub( sh, sx, ox, ordx, i, MODE ); + idx = ind2sub( sh, sx, 0, ordx, i, MODE ); // return subscripts from the perspective of the ndarray view fcn.call( thisArg, get( xbuf, ix ), idx, x.ref ); } } diff --git a/base/ind/benchmark/c/benchmark.c b/base/ind/benchmark/c/benchmark.c index be2fc233..fe4ed59a 100644 --- a/base/ind/benchmark/c/benchmark.c +++ b/base/ind/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `ind`. -*/ #include "stdlib/ndarray/base/ind.h" #include "stdlib/ndarray/index_modes.h" #include @@ -35,7 +32,7 @@ /** * Prints the TAP version. */ -void print_version( void ) { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -45,7 +42,7 @@ void print_version( void ) { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -59,7 +56,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -73,18 +70,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic( void ) { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double( void ) { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -94,7 +91,7 @@ double rand_double( void ) { * * @return elapsed time in seconds */ -double benchmark1( void ) { +static double benchmark1( void ) { double elapsed; int64_t idx; double t; @@ -121,7 +118,7 @@ double benchmark1( void ) { * * @return elapsed time in seconds */ -double benchmark2( void ) { +static double benchmark2( void ) { double elapsed; int64_t idx; double t; @@ -148,7 +145,7 @@ double benchmark2( void ) { * * @return elapsed time in seconds */ -double benchmark3( void ) { +static double benchmark3( void ) { double elapsed; int64_t idx; double t; @@ -175,7 +172,7 @@ double benchmark3( void ) { * * @return elapsed time in seconds */ -double benchmark4( void ) { +static double benchmark4( void ) { double elapsed; int64_t idx; double t; diff --git a/base/ind2sub/benchmark/c/benchmark.c b/base/ind2sub/benchmark/c/benchmark.c index 304232e5..8e92d667 100644 --- a/base/ind2sub/benchmark/c/benchmark.c +++ b/base/ind2sub/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `ind2sub`. -*/ #include "stdlib/ndarray/base/ind2sub.h" #include "stdlib/ndarray/index_modes.h" #include "stdlib/ndarray/orders.h" @@ -36,7 +33,7 @@ /** * Prints the TAP version. */ -void print_version( void ) { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -46,7 +43,7 @@ void print_version( void ) { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -60,7 +57,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -74,18 +71,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic( void ) { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double( void ) { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -95,7 +92,7 @@ double rand_double( void ) { * * @return elapsed time in seconds */ -double benchmark1( void ) { +static double benchmark1( void ) { double elapsed; int64_t idx; int64_t flg; @@ -131,7 +128,7 @@ double benchmark1( void ) { * * @return elapsed time in seconds */ -double benchmark2( void ) { +static double benchmark2( void ) { double elapsed; int64_t idx; int64_t flg; @@ -167,7 +164,7 @@ double benchmark2( void ) { * * @return elapsed time in seconds */ -double benchmark3( void ) { +static double benchmark3( void ) { double elapsed; int64_t idx; int64_t flg; @@ -203,7 +200,7 @@ double benchmark3( void ) { * * @return elapsed time in seconds */ -double benchmark4( void ) { +static double benchmark4( void ) { double elapsed; int64_t idx; int64_t flg; @@ -239,7 +236,7 @@ double benchmark4( void ) { * * @return elapsed time in seconds */ -double benchmark5( void ) { +static double benchmark5( void ) { double elapsed; int64_t idx; int64_t flg; @@ -275,7 +272,7 @@ double benchmark5( void ) { * * @return elapsed time in seconds */ -double benchmark6( void ) { +static double benchmark6( void ) { double elapsed; int64_t idx; int64_t flg; @@ -311,7 +308,7 @@ double benchmark6( void ) { * * @return elapsed time in seconds */ -double benchmark7( void ) { +static double benchmark7( void ) { double elapsed; int64_t idx; int64_t flg; @@ -347,7 +344,7 @@ double benchmark7( void ) { * * @return elapsed time in seconds */ -double benchmark8( void ) { +static double benchmark8( void ) { double elapsed; int64_t idx; int64_t flg; @@ -383,7 +380,7 @@ double benchmark8( void ) { * * @return elapsed time in seconds */ -double benchmark9( void ) { +static double benchmark9( void ) { double elapsed; int64_t idx; int64_t flg; @@ -419,7 +416,7 @@ double benchmark9( void ) { * * @return elapsed time in seconds */ -double benchmark10( void ) { +static double benchmark10( void ) { double elapsed; int64_t idx; int64_t flg; @@ -455,7 +452,7 @@ double benchmark10( void ) { * * @return elapsed time in seconds */ -double benchmark11( void ) { +static double benchmark11( void ) { double elapsed; int64_t idx; int64_t flg; @@ -491,7 +488,7 @@ double benchmark11( void ) { * * @return elapsed time in seconds */ -double benchmark12( void ) { +static double benchmark12( void ) { double elapsed; int64_t idx; int64_t flg; @@ -527,7 +524,7 @@ double benchmark12( void ) { * * @return elapsed time in seconds */ -double benchmark13( void ) { +static double benchmark13( void ) { double elapsed; int64_t idx; int64_t flg; @@ -563,7 +560,7 @@ double benchmark13( void ) { * * @return elapsed time in seconds */ -double benchmark14( void ) { +static double benchmark14( void ) { double elapsed; int64_t idx; int64_t flg; @@ -599,7 +596,7 @@ double benchmark14( void ) { * * @return elapsed time in seconds */ -double benchmark15( void ) { +static double benchmark15( void ) { double elapsed; int64_t idx; int64_t flg; @@ -635,7 +632,7 @@ double benchmark15( void ) { * * @return elapsed time in seconds */ -double benchmark16( void ) { +static double benchmark16( void ) { double elapsed; int64_t idx; int64_t flg; diff --git a/base/iteration-order/benchmark/c/benchmark.c b/base/iteration-order/benchmark/c/benchmark.c index 95a6a0a2..34aef358 100644 --- a/base/iteration-order/benchmark/c/benchmark.c +++ b/base/iteration-order/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `iteration_order`. -*/ #include "stdlib/ndarray/base/iteration_order.h" #include #include @@ -34,7 +31,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -44,7 +41,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -58,7 +55,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -72,18 +69,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -93,7 +90,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int8_t o; double t; diff --git a/base/max-view-buffer-index/benchmark/c/benchmark.c b/base/max-view-buffer-index/benchmark/c/benchmark.c index e6faa0ed..077163b2 100644 --- a/base/max-view-buffer-index/benchmark/c/benchmark.c +++ b/base/max-view-buffer-index/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `max_view_buffer_index`. -*/ #include #include #include @@ -34,7 +31,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -44,7 +41,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -58,7 +55,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -72,18 +69,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -93,7 +90,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int64_t n; double t; diff --git a/base/min-view-buffer-index/benchmark/c/benchmark.c b/base/min-view-buffer-index/benchmark/c/benchmark.c index 41dda8b1..60fcd17d 100644 --- a/base/min-view-buffer-index/benchmark/c/benchmark.c +++ b/base/min-view-buffer-index/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `min_view_buffer_index`. -*/ #include #include #include @@ -34,7 +31,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -44,7 +41,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -58,7 +55,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -72,18 +69,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -93,7 +90,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int64_t n; double t; diff --git a/base/minmax-view-buffer-index/benchmark/c/benchmark.c b/base/minmax-view-buffer-index/benchmark/c/benchmark.c index 753a2ffb..dbbf895e 100644 --- a/base/minmax-view-buffer-index/benchmark/c/benchmark.c +++ b/base/minmax-view-buffer-index/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `minmax_view_buffer_index`. -*/ #include "stdlib/ndarray/base/minmax_view_buffer_index.h" #include #include @@ -34,7 +31,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -44,7 +41,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -58,7 +55,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -72,18 +69,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -93,7 +90,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; double t; int i; diff --git a/base/nonsingleton-dimensions/benchmark/c/benchmark.c b/base/nonsingleton-dimensions/benchmark/c/benchmark.c index 8a6ebee8..aea05810 100644 --- a/base/nonsingleton-dimensions/benchmark/c/benchmark.c +++ b/base/nonsingleton-dimensions/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `nonsingleton-dimensions`. -*/ #include "stdlib/ndarray/base/nonsingleton_dimensions.h" #include #include @@ -34,7 +31,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -44,7 +41,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -58,7 +55,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -72,18 +69,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -93,7 +90,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int64_t n; double t; diff --git a/base/normalize-index/benchmark/c/benchmark.c b/base/normalize-index/benchmark/c/benchmark.c index 90069a4b..c9364124 100644 --- a/base/normalize-index/benchmark/c/benchmark.c +++ b/base/normalize-index/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `normalize_index`. -*/ #include "stdlib/ndarray/base/normalize_index.h" #include #include @@ -34,7 +31,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -44,7 +41,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -58,7 +55,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -72,18 +69,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -93,7 +90,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int64_t idx; double t; diff --git a/base/numel/benchmark/c/benchmark.c b/base/numel/benchmark/c/benchmark.c index 0836c0ac..379a0ef9 100644 --- a/base/numel/benchmark/c/benchmark.c +++ b/base/numel/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `numel`. -*/ #include #include #include @@ -34,7 +31,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -44,7 +41,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -58,7 +55,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -72,18 +69,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -93,7 +90,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int64_t n; double t; diff --git a/base/shape2strides/benchmark/c/benchmark.c b/base/shape2strides/benchmark/c/benchmark.c index cf4568c6..e7fc86fe 100644 --- a/base/shape2strides/benchmark/c/benchmark.c +++ b/base/shape2strides/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `shape2strides`. -*/ #include "stdlib/ndarray/base/shape2strides.h" #include "stdlib/ndarray/orders.h" #include @@ -35,7 +32,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -45,7 +42,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -59,7 +56,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -73,18 +70,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -94,7 +91,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark1() { +static double benchmark1( void ) { double elapsed; double t; int i; @@ -124,7 +121,7 @@ double benchmark1() { * * @return elapsed time in seconds */ -double benchmark2() { +static double benchmark2( void ) { double elapsed; double t; int i; diff --git a/base/singleton-dimensions/benchmark/c/benchmark.c b/base/singleton-dimensions/benchmark/c/benchmark.c index 3ee95c6e..989ccbfa 100644 --- a/base/singleton-dimensions/benchmark/c/benchmark.c +++ b/base/singleton-dimensions/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `singleton-dimensions`. -*/ #include "stdlib/ndarray/base/singleton_dimensions.h" #include #include @@ -34,7 +31,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -44,7 +41,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -58,7 +55,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -72,18 +69,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -93,7 +90,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int64_t n; double t; diff --git a/base/strides2offset/benchmark/c/benchmark.c b/base/strides2offset/benchmark/c/benchmark.c index 0f1e845e..ea393857 100644 --- a/base/strides2offset/benchmark/c/benchmark.c +++ b/base/strides2offset/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `strides2offset`. -*/ #include #include #include @@ -34,7 +31,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -44,7 +41,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -58,7 +55,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -72,18 +69,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -93,7 +90,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int64_t o; double t; diff --git a/base/strides2order/benchmark/c/benchmark.c b/base/strides2order/benchmark/c/benchmark.c index 65554844..f9e5feff 100644 --- a/base/strides2order/benchmark/c/benchmark.c +++ b/base/strides2order/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `strides2order`. -*/ #include "stdlib/ndarray/base/strides2order.h" #include #include @@ -34,7 +31,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -44,7 +41,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -58,7 +55,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -72,18 +69,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -93,7 +90,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int8_t o; double t; diff --git a/base/sub2ind/benchmark/c/benchmark.c b/base/sub2ind/benchmark/c/benchmark.c index 733f9971..80c6fc3b 100644 --- a/base/sub2ind/benchmark/c/benchmark.c +++ b/base/sub2ind/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `sub2ind`. -*/ #include "stdlib/ndarray/base/sub2ind.h" #include "stdlib/ndarray/index_modes.h" #include @@ -35,7 +32,7 @@ /** * Prints the TAP version. */ -void print_version( void ) { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -45,7 +42,7 @@ void print_version( void ) { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -59,7 +56,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -73,18 +70,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic( void ) { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double( void ) { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -94,7 +91,7 @@ double rand_double( void ) { * * @return elapsed time in seconds */ -double benchmark1( void ) { +static double benchmark1( void ) { double elapsed; int64_t idx; double t; @@ -133,7 +130,7 @@ double benchmark1( void ) { * * @return elapsed time in seconds */ -double benchmark2( void ) { +static double benchmark2( void ) { double elapsed; int64_t idx; double t; @@ -172,7 +169,7 @@ double benchmark2( void ) { * * @return elapsed time in seconds */ -double benchmark3( void ) { +static double benchmark3( void ) { double elapsed; int64_t idx; double t; @@ -211,7 +208,7 @@ double benchmark3( void ) { * * @return elapsed time in seconds */ -double benchmark4( void ) { +static double benchmark4( void ) { double elapsed; int64_t idx; double t; @@ -250,7 +247,7 @@ double benchmark4( void ) { * * @return elapsed time in seconds */ -double benchmark5( void ) { +static double benchmark5( void ) { double elapsed; int64_t idx; double t; @@ -289,7 +286,7 @@ double benchmark5( void ) { * * @return elapsed time in seconds */ -double benchmark6( void ) { +static double benchmark6( void ) { double elapsed; int64_t idx; double t; @@ -328,7 +325,7 @@ double benchmark6( void ) { * * @return elapsed time in seconds */ -double benchmark7( void ) { +static double benchmark7( void ) { double elapsed; int64_t idx; double t; @@ -368,7 +365,7 @@ double benchmark7( void ) { * * @return elapsed time in seconds */ -double benchmark8( void ) { +static double benchmark8( void ) { double elapsed; int64_t idx; double t; @@ -409,7 +406,7 @@ double benchmark8( void ) { * * @return elapsed time in seconds */ -double benchmark9( void ) { +static double benchmark9( void ) { double elapsed; int64_t idx; double t; @@ -449,7 +446,7 @@ double benchmark9( void ) { * * @return elapsed time in seconds */ -double benchmark10( void ) { +static double benchmark10( void ) { double elapsed; int64_t idx; double t; @@ -490,7 +487,7 @@ double benchmark10( void ) { * * @return elapsed time in seconds */ -double benchmark11( void ) { +static double benchmark11( void ) { double elapsed; int64_t idx; double t; @@ -529,7 +526,7 @@ double benchmark11( void ) { * * @return elapsed time in seconds */ -double benchmark12( void ) { +static double benchmark12( void ) { double elapsed; int64_t idx; double t; diff --git a/base/vind2bind/benchmark/c/benchmark.c b/base/vind2bind/benchmark/c/benchmark.c index da24c2ed..df94eb07 100644 --- a/base/vind2bind/benchmark/c/benchmark.c +++ b/base/vind2bind/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `vind2bind`. -*/ #include #include #include @@ -36,7 +33,7 @@ /** * Prints the TAP version. */ -void print_version( void ) { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -46,7 +43,7 @@ void print_version( void ) { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -60,7 +57,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -74,18 +71,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic( void ) { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double( void ) { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -95,7 +92,7 @@ double rand_double( void ) { * * @return elapsed time in seconds */ -double benchmark1( void ) { +static double benchmark1( void ) { double elapsed; int64_t idx; int64_t ind; @@ -129,7 +126,7 @@ double benchmark1( void ) { * * @return elapsed time in seconds */ -double benchmark2( void ) { +static double benchmark2( void ) { double elapsed; int64_t idx; int64_t ind; @@ -163,7 +160,7 @@ double benchmark2( void ) { * * @return elapsed time in seconds */ -double benchmark3( void ) { +static double benchmark3( void ) { double elapsed; int64_t idx; int64_t ind; @@ -197,7 +194,7 @@ double benchmark3( void ) { * * @return elapsed time in seconds */ -double benchmark4( void ) { +static double benchmark4( void ) { double elapsed; int64_t idx; int64_t ind; @@ -231,7 +228,7 @@ double benchmark4( void ) { * * @return elapsed time in seconds */ -double benchmark5( void ) { +static double benchmark5( void ) { double elapsed; int64_t idx; int64_t ind; @@ -265,7 +262,7 @@ double benchmark5( void ) { * * @return elapsed time in seconds */ -double benchmark6( void ) { +static double benchmark6( void ) { double elapsed; int64_t idx; int64_t ind; @@ -299,7 +296,7 @@ double benchmark6( void ) { * * @return elapsed time in seconds */ -double benchmark7( void ) { +static double benchmark7( void ) { double elapsed; int64_t idx; int64_t ind; @@ -333,7 +330,7 @@ double benchmark7( void ) { * * @return elapsed time in seconds */ -double benchmark8( void ) { +static double benchmark8( void ) { double elapsed; int64_t idx; int64_t ind; @@ -367,7 +364,7 @@ double benchmark8( void ) { * * @return elapsed time in seconds */ -double benchmark9( void ) { +static double benchmark9( void ) { double elapsed; int64_t idx; int64_t ind; @@ -401,7 +398,7 @@ double benchmark9( void ) { * * @return elapsed time in seconds */ -double benchmark10( void ) { +static double benchmark10( void ) { double elapsed; int64_t idx; int64_t ind; @@ -435,7 +432,7 @@ double benchmark10( void ) { * * @return elapsed time in seconds */ -double benchmark11( void ) { +static double benchmark11( void ) { double elapsed; int64_t idx; int64_t ind; @@ -469,7 +466,7 @@ double benchmark11( void ) { * * @return elapsed time in seconds */ -double benchmark12( void ) { +static double benchmark12( void ) { double elapsed; int64_t idx; int64_t ind; @@ -503,7 +500,7 @@ double benchmark12( void ) { * * @return elapsed time in seconds */ -double benchmark13( void ) { +static double benchmark13( void ) { double elapsed; int64_t idx; int64_t ind; @@ -537,7 +534,7 @@ double benchmark13( void ) { * * @return elapsed time in seconds */ -double benchmark14( void ) { +static double benchmark14( void ) { double elapsed; int64_t idx; int64_t ind; @@ -571,7 +568,7 @@ double benchmark14( void ) { * * @return elapsed time in seconds */ -double benchmark15( void ) { +static double benchmark15( void ) { double elapsed; int64_t idx; int64_t ind; @@ -605,7 +602,7 @@ double benchmark15( void ) { * * @return elapsed time in seconds */ -double benchmark16( void ) { +static double benchmark16( void ) { double elapsed; int64_t idx; int64_t ind; diff --git a/base/wrap-index/benchmark/c/benchmark.c b/base/wrap-index/benchmark/c/benchmark.c index a6588988..8b0b5fb5 100644 --- a/base/wrap-index/benchmark/c/benchmark.c +++ b/base/wrap-index/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `wrap_index`. -*/ #include #include #include @@ -34,7 +31,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -44,7 +41,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -58,7 +55,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -72,18 +69,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -93,7 +90,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark() { +static double benchmark( void ) { double elapsed; int64_t idx; int64_t max; diff --git a/ctor/benchmark/c/benchmark.c b/ctor/benchmark/c/benchmark.c index c18cd5ce..d9f6eb62 100644 --- a/ctor/benchmark/c/benchmark.c +++ b/ctor/benchmark/c/benchmark.c @@ -16,9 +16,6 @@ * limitations under the License. */ -/** -* Benchmark `ndarray`. -*/ #include "stdlib/ndarray/ctor.h" #include "stdlib/ndarray/dtypes.h" #include "stdlib/ndarray/index_modes.h" @@ -38,7 +35,7 @@ /** * Prints the TAP version. */ -void print_version() { +static void print_version( void ) { printf( "TAP version 13\n" ); } @@ -48,7 +45,7 @@ void print_version() { * @param total total number of tests * @param passing total number of passing tests */ -void print_summary( int total, int passing ) { +static void print_summary( int total, int passing ) { printf( "#\n" ); printf( "1..%d\n", total ); // TAP plan printf( "# total %d\n", total ); @@ -62,7 +59,7 @@ void print_summary( int total, int passing ) { * * @param elapsed elapsed time in seconds */ -void print_results( double elapsed ) { +static void print_results( double elapsed ) { double rate = (double)ITERATIONS / elapsed; printf( " ---\n" ); printf( " iterations: %d\n", ITERATIONS ); @@ -76,18 +73,18 @@ void print_results( double elapsed ) { * * @return clock time */ -double tic() { +static double tic( void ) { struct timeval now; gettimeofday( &now, NULL ); return (double)now.tv_sec + (double)now.tv_usec/1.0e6; } /** -* Generates a random double on the interval [0,1]. +* Generates a random number on the interval [0,1). * -* @return random double +* @return random number */ -double rand_double() { +static double rand_double( void ) { int r = rand(); return (double)r / ( (double)RAND_MAX + 1.0 ); } @@ -97,7 +94,7 @@ double rand_double() { * * @return elapsed time in seconds */ -double benchmark1() { +static double benchmark1( void ) { double elapsed; double t; int i; @@ -138,7 +135,7 @@ double benchmark1() { * * @return elapsed time in seconds */ -double benchmark2() { +static double benchmark2( void ) { double elapsed; int64_t v; double t; @@ -182,7 +179,7 @@ double benchmark2() { * * @return elapsed time in seconds */ -double benchmark3() { +static double benchmark3( void ) { double elapsed; uint8_t *v; double t; @@ -226,7 +223,7 @@ double benchmark3() { * * @return elapsed time in seconds */ -double benchmark4() { +static double benchmark4( void ) { enum STDLIB_NDARRAY_DTYPE v; double elapsed; double t; @@ -270,7 +267,7 @@ double benchmark4() { * * @return elapsed time in seconds */ -double benchmark5() { +static double benchmark5( void ) { double elapsed; int64_t v; double t; @@ -313,7 +310,7 @@ double benchmark5() { * * @return elapsed time in seconds */ -double benchmark6() { +static double benchmark6( void ) { double elapsed; int64_t v; double t; @@ -357,7 +354,7 @@ double benchmark6() { * * @return elapsed time in seconds */ -double benchmark7() { +static double benchmark7( void ) { double elapsed; int64_t v; double t; @@ -401,7 +398,7 @@ double benchmark7() { * * @return elapsed time in seconds */ -double benchmark8() { +static double benchmark8( void ) { double elapsed; int64_t v; double t; @@ -445,7 +442,7 @@ double benchmark8() { * * @return elapsed time in seconds */ -double benchmark9() { +static double benchmark9( void ) { enum STDLIB_NDARRAY_ORDER v; double elapsed; double t; @@ -489,7 +486,7 @@ double benchmark9() { * * @return elapsed time in seconds */ -double benchmark10() { +static double benchmark10( void ) { double elapsed; int64_t *v; double t; @@ -533,7 +530,7 @@ double benchmark10() { * * @return elapsed time in seconds */ -double benchmark11() { +static double benchmark11( void ) { double elapsed; int64_t *v; double t; @@ -577,7 +574,7 @@ double benchmark11() { * * @return elapsed time in seconds */ -double benchmark12() { +static double benchmark12( void ) { double elapsed; int64_t sub[1]; uint8_t v; @@ -624,7 +621,7 @@ double benchmark12() { * * @return elapsed time in seconds */ -double benchmark13() { +static double benchmark13( void ) { double elapsed; int64_t sub[1]; uint8_t v; @@ -671,7 +668,7 @@ double benchmark13() { * * @return elapsed time in seconds */ -double benchmark14() { +static double benchmark14( void ) { double elapsed; int64_t sub[1]; uint8_t v; @@ -724,7 +721,7 @@ double benchmark14() { * * @return elapsed time in seconds */ -double benchmark15() { +static double benchmark15( void ) { double elapsed; int64_t sub[2]; uint8_t v; @@ -773,7 +770,7 @@ double benchmark15() { * * @return elapsed time in seconds */ -double benchmark16() { +static double benchmark16( void ) { double elapsed; int64_t sub[2]; uint8_t v; @@ -822,7 +819,7 @@ double benchmark16() { * * @return elapsed time in seconds */ -double benchmark17() { +static double benchmark17( void ) { double elapsed; int64_t sub[2]; uint8_t v; @@ -871,7 +868,7 @@ double benchmark17() { * * @return elapsed time in seconds */ -double benchmark18() { +static double benchmark18( void ) { double elapsed; int64_t sub[3]; uint8_t v; @@ -921,7 +918,7 @@ double benchmark18() { * * @return elapsed time in seconds */ -double benchmark19() { +static double benchmark19( void ) { double elapsed; int64_t sub[3]; uint8_t v; @@ -971,7 +968,7 @@ double benchmark19() { * * @return elapsed time in seconds */ -double benchmark20() { +static double benchmark20( void ) { double elapsed; int64_t sub[3]; uint8_t v; @@ -1021,7 +1018,7 @@ double benchmark20() { * * @return elapsed time in seconds */ -double benchmark21() { +static double benchmark21( void ) { double elapsed; int64_t sub[4]; uint8_t v; @@ -1072,7 +1069,7 @@ double benchmark21() { * * @return elapsed time in seconds */ -double benchmark22() { +static double benchmark22( void ) { double elapsed; int64_t sub[4]; uint8_t v; @@ -1123,7 +1120,7 @@ double benchmark22() { * * @return elapsed time in seconds */ -double benchmark23() { +static double benchmark23( void ) { double elapsed; int64_t sub[4]; uint8_t v; @@ -1174,7 +1171,7 @@ double benchmark23() { * * @return elapsed time in seconds */ -double benchmark24() { +static double benchmark24( void ) { double elapsed; int64_t sub[5]; uint8_t v; @@ -1226,7 +1223,7 @@ double benchmark24() { * * @return elapsed time in seconds */ -double benchmark25() { +static double benchmark25( void ) { double elapsed; int64_t sub[5]; uint8_t v; @@ -1278,7 +1275,7 @@ double benchmark25() { * * @return elapsed time in seconds */ -double benchmark26() { +static double benchmark26( void ) { double elapsed; int64_t sub[5]; uint8_t v; @@ -1330,7 +1327,7 @@ double benchmark26() { * * @return elapsed time in seconds */ -double benchmark27() { +static double benchmark27( void ) { double elapsed; int64_t idx; uint8_t v; @@ -1377,7 +1374,7 @@ double benchmark27() { * * @return elapsed time in seconds */ -double benchmark28() { +static double benchmark28( void ) { double elapsed; int64_t idx; uint8_t v; @@ -1424,7 +1421,7 @@ double benchmark28() { * * @return elapsed time in seconds */ -double benchmark29() { +static double benchmark29( void ) { double elapsed; int64_t idx; uint8_t v; @@ -1471,7 +1468,7 @@ double benchmark29() { * * @return elapsed time in seconds */ -double benchmark30() { +static double benchmark30( void ) { double elapsed; int64_t idx; uint8_t v; @@ -1518,7 +1515,7 @@ double benchmark30() { * * @return elapsed time in seconds */ -double benchmark31() { +static double benchmark31( void ) { double elapsed; int64_t idx; uint8_t v; @@ -1565,7 +1562,7 @@ double benchmark31() { * * @return elapsed time in seconds */ -double benchmark32() { +static double benchmark32( void ) { double elapsed; int64_t idx; uint8_t v; @@ -1612,7 +1609,7 @@ double benchmark32() { * * @return elapsed time in seconds */ -double benchmark33() { +static double benchmark33( void ) { double elapsed; int64_t idx; uint8_t v; @@ -1659,7 +1656,7 @@ double benchmark33() { * * @return elapsed time in seconds */ -double benchmark34() { +static double benchmark34( void ) { double elapsed; int64_t idx; uint8_t v; @@ -1706,7 +1703,7 @@ double benchmark34() { * * @return elapsed time in seconds */ -double benchmark35() { +static double benchmark35( void ) { double elapsed; int64_t idx; uint8_t v; @@ -1753,7 +1750,7 @@ double benchmark35() { * * @return elapsed time in seconds */ -double benchmark36() { +static double benchmark36( void ) { double elapsed; int64_t sub[1]; uint8_t v; @@ -1801,7 +1798,7 @@ double benchmark36() { * * @return elapsed time in seconds */ -double benchmark37() { +static double benchmark37( void ) { double elapsed; int64_t sub[1]; uint8_t v; @@ -1849,7 +1846,7 @@ double benchmark37() { * * @return elapsed time in seconds */ -double benchmark38() { +static double benchmark38( void ) { double elapsed; int64_t sub[1]; uint8_t v; @@ -1903,7 +1900,7 @@ double benchmark38() { * * @return elapsed time in seconds */ -double benchmark39() { +static double benchmark39( void ) { double elapsed; int64_t sub[2]; uint8_t v; @@ -1953,7 +1950,7 @@ double benchmark39() { * * @return elapsed time in seconds */ -double benchmark40() { +static double benchmark40( void ) { double elapsed; int64_t sub[2]; uint8_t v; @@ -2003,7 +2000,7 @@ double benchmark40() { * * @return elapsed time in seconds */ -double benchmark41() { +static double benchmark41( void ) { double elapsed; int64_t sub[2]; uint8_t v; @@ -2053,7 +2050,7 @@ double benchmark41() { * * @return elapsed time in seconds */ -double benchmark42() { +static double benchmark42( void ) { double elapsed; int64_t sub[3]; uint8_t v; @@ -2104,7 +2101,7 @@ double benchmark42() { * * @return elapsed time in seconds */ -double benchmark43() { +static double benchmark43( void ) { double elapsed; int64_t sub[3]; uint8_t v; @@ -2155,7 +2152,7 @@ double benchmark43() { * * @return elapsed time in seconds */ -double benchmark44() { +static double benchmark44( void ) { double elapsed; int64_t sub[3]; uint8_t v; @@ -2206,7 +2203,7 @@ double benchmark44() { * * @return elapsed time in seconds */ -double benchmark45() { +static double benchmark45( void ) { double elapsed; int64_t sub[4]; uint8_t v; @@ -2258,7 +2255,7 @@ double benchmark45() { * * @return elapsed time in seconds */ -double benchmark46() { +static double benchmark46( void ) { double elapsed; int64_t sub[4]; uint8_t v; @@ -2310,7 +2307,7 @@ double benchmark46() { * * @return elapsed time in seconds */ -double benchmark47() { +static double benchmark47( void ) { double elapsed; int64_t sub[4]; uint8_t v; @@ -2362,7 +2359,7 @@ double benchmark47() { * * @return elapsed time in seconds */ -double benchmark48() { +static double benchmark48( void ) { double elapsed; int64_t sub[5]; uint8_t v; @@ -2415,7 +2412,7 @@ double benchmark48() { * * @return elapsed time in seconds */ -double benchmark49() { +static double benchmark49( void ) { double elapsed; int64_t sub[5]; uint8_t v; @@ -2468,7 +2465,7 @@ double benchmark49() { * * @return elapsed time in seconds */ -double benchmark50() { +static double benchmark50( void ) { double elapsed; int64_t sub[5]; uint8_t v; @@ -2521,7 +2518,7 @@ double benchmark50() { * * @return elapsed time in seconds */ -double benchmark51() { +static double benchmark51( void ) { double elapsed; int64_t idx; uint8_t v; @@ -2569,7 +2566,7 @@ double benchmark51() { * * @return elapsed time in seconds */ -double benchmark52() { +static double benchmark52( void ) { double elapsed; int64_t idx; uint8_t v; @@ -2617,7 +2614,7 @@ double benchmark52() { * * @return elapsed time in seconds */ -double benchmark53() { +static double benchmark53( void ) { double elapsed; int64_t idx; uint8_t v; @@ -2671,7 +2668,7 @@ double benchmark53() { * * @return elapsed time in seconds */ -double benchmark54() { +static double benchmark54( void ) { double elapsed; int64_t idx; uint8_t v; @@ -2719,7 +2716,7 @@ double benchmark54() { * * @return elapsed time in seconds */ -double benchmark55() { +static double benchmark55( void ) { double elapsed; int64_t idx; uint8_t v; @@ -2767,7 +2764,7 @@ double benchmark55() { * * @return elapsed time in seconds */ -double benchmark56() { +static double benchmark56( void ) { double elapsed; int64_t idx; uint8_t v; @@ -2815,7 +2812,7 @@ double benchmark56() { * * @return elapsed time in seconds */ -double benchmark57() { +static double benchmark57( void ) { double elapsed; int64_t idx; uint8_t v; @@ -2863,7 +2860,7 @@ double benchmark57() { * * @return elapsed time in seconds */ -double benchmark58() { +static double benchmark58( void ) { double elapsed; int64_t idx; uint8_t v; @@ -2911,7 +2908,7 @@ double benchmark58() { * * @return elapsed time in seconds */ -double benchmark59() { +static double benchmark59( void ) { double elapsed; int64_t idx; uint8_t v; @@ -2959,7 +2956,7 @@ double benchmark59() { * * @return elapsed time in seconds */ -double benchmark60() { +static double benchmark60( void ) { double elapsed; int64_t v; int64_t j; @@ -3004,7 +3001,7 @@ double benchmark60() { * * @return elapsed time in seconds */ -double benchmark61() { +static double benchmark61( void ) { double elapsed; int64_t v; int64_t j; @@ -3049,7 +3046,7 @@ double benchmark61() { * * @return elapsed time in seconds */ -double benchmark62() { +static double benchmark62( void ) { enum STDLIB_NDARRAY_INDEX_MODE v; double elapsed; double t; @@ -3093,7 +3090,7 @@ double benchmark62() { * * @return elapsed time in seconds */ -double benchmark63() { +static double benchmark63( void ) { double elapsed; int8_t *v; double t; @@ -3137,7 +3134,7 @@ double benchmark63() { * * @return elapsed time in seconds */ -double benchmark64() { +static double benchmark64( void ) { enum STDLIB_NDARRAY_INDEX_MODE v; double elapsed; int64_t j;