Skip to content

Commit 62d0273

Browse files
committed
update readme and types for c bench
1 parent ae4943f commit 62d0273

File tree

2 files changed

+11
-26
lines changed

2 files changed

+11
-26
lines changed

lib/node_modules/@stdlib/blas/ext/base/snancusumpw/README.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -323,16 +323,7 @@ int main( void ) {
323323
324324
<section class="related">
325325
326-
* * *
327-
328-
## See Also
329-
330-
- <span class="package-name">[`@stdlib/blas/ext/base/dnansumpw`][@stdlib/blas/ext/base/dnansumpw]</span><span class="delimiter">: </span><span class="description">calculate the sum of double-precision floating-point strided array elements, ignoring NaN values and using pairwise summation.</span>
331-
- <span class="package-name">[`@stdlib/blas/ext/base/snansumpw`][@stdlib/blas/ext/base/snansumpw]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements, ignoring NaN values and using pairwise summation.</span>
332-
- <span class="package-name">[`@stdlib/blas/ext/base/scusumpw`][@stdlib/blas/ext/base/scusumpw]</span><span class="delimiter">: </span><span class="description">calculate the cumulative sum of single-precision floating-point strided array elements using pairwise summation.</span>
333-
334326
</section>
335-
336327
<!-- /.related -->
337328
338329
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
@@ -348,12 +339,6 @@ int main( void ) {
348339
349340
<!-- <related-links> -->
350341
351-
[@stdlib/blas/ext/base/dnansumpw]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/dnansumpw
352-
353-
[@stdlib/blas/ext/base/snansumpw]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/snansumpw
354-
355-
[@stdlib/blas/ext/base/scusumpw]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/scusumpw
356-
357342
<!-- </related-links> -->
358343
359344
</section>

lib/node_modules/@stdlib/blas/ext/base/snancusumpw/benchmark/c/benchmark.length.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ static void print_summary( int total, int passing ) {
5757
* @param iterations number of iterations
5858
* @param elapsed elapsed time in seconds
5959
*/
60-
static void print_results( int iterations, float elapsed ) {
61-
float rate = (float)iterations / elapsed;
60+
static void print_results( int iterations, double elapsed ) {
61+
double rate = (double)iterations / elapsed;
6262
printf( " ---\n" );
6363
printf( " iterations: %d\n", iterations );
6464
printf( " elapsed: %0.9f\n", elapsed );
@@ -71,10 +71,10 @@ static void print_results( int iterations, float elapsed ) {
7171
*
7272
* @return clock time
7373
*/
74-
static float tic( void ) {
74+
static double tic( void ) {
7575
struct timeval now;
7676
gettimeofday( &now, NULL );
77-
return (float)now.tv_sec + (float)now.tv_usec / 1.0e6f;
77+
return (double)now.tv_sec + (double)now.tv_usec/1.0e6;
7878
}
7979

8080
/**
@@ -94,11 +94,11 @@ static float rand_float( void ) {
9494
* @param len array length
9595
* @return elapsed time in seconds
9696
*/
97-
static float benchmark1( int iterations, int len ) {
98-
float elapsed;
97+
static double benchmark1( int iterations, int len ) {
98+
double elapsed;
9999
float *x;
100100
float *y;
101-
float t;
101+
double t;
102102
int i;
103103

104104
x = (float *)malloc( len * sizeof( float ) );
@@ -136,11 +136,11 @@ static float benchmark1( int iterations, int len ) {
136136
* @param len array length
137137
* @return elapsed time in seconds
138138
*/
139-
static float benchmark2( int iterations, int len ) {
140-
float elapsed;
139+
static double benchmark2( int iterations, int len ) {
140+
double elapsed;
141141
float *x;
142142
float *y;
143-
float t;
143+
double t;
144144
int i;
145145

146146
x = (float *)malloc( len * sizeof( float ) );
@@ -175,7 +175,7 @@ static float benchmark2( int iterations, int len ) {
175175
* Main execution sequence.
176176
*/
177177
int main( void ) {
178-
float elapsed;
178+
double elapsed;
179179
int count;
180180
int iter;
181181
int len;

0 commit comments

Comments
 (0)