feat: add blas/ext/base/dnancusumors#9911
Conversation
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
Coverage Report
The above coverage report was generated for the changes in this PR. |
| <section class="related"> | ||
|
|
||
| * * * | ||
|
|
||
| ## See Also | ||
|
|
||
| - <span class="package-name">[`@stdlib/blas/ext/base/dcusum`][@stdlib/blas/ext/base/dcusum]</span><span class="delimiter">: </span><span class="description">calculate the cumulative sum of double-precision floating-point strided array elements.</span> | ||
| - <span class="package-name">[`@stdlib/blas/ext/base/gcusumkbn2`][@stdlib/blas/ext/base/gcusumors]</span><span class="delimiter">: </span><span class="description">calculate the cumulative sum of strided array elements using ordinary recursive summation.</span> | ||
| - <span class="package-name">[`@stdlib/blas/ext/base/scusumkbn2`][@stdlib/blas/ext/base/scusumors]</span><span class="delimiter">: </span><span class="description">calculate the cumulative sum of single-precision floating-point strided array elements using ordinary recursive summation.</span> | ||
|
|
||
| </section> |
There was a problem hiding this comment.
| <section class="related"> | |
| * * * | |
| ## See Also | |
| - <span class="package-name">[`@stdlib/blas/ext/base/dcusum`][@stdlib/blas/ext/base/dcusum]</span><span class="delimiter">: </span><span class="description">calculate the cumulative sum of double-precision floating-point strided array elements.</span> | |
| - <span class="package-name">[`@stdlib/blas/ext/base/gcusumkbn2`][@stdlib/blas/ext/base/gcusumors]</span><span class="delimiter">: </span><span class="description">calculate the cumulative sum of strided array elements using ordinary recursive summation.</span> | |
| - <span class="package-name">[`@stdlib/blas/ext/base/scusumkbn2`][@stdlib/blas/ext/base/scusumors]</span><span class="delimiter">: </span><span class="description">calculate the cumulative sum of single-precision floating-point strided array elements using ordinary recursive summation.</span> | |
| </section> | |
| <section class="related"> | |
| </section> |
There was a problem hiding this comment.
Related packages are autogenerated.
| <!-- <related-links> --> | ||
|
|
||
| [@stdlib/blas/ext/base/dcusum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/dcusum | ||
|
|
||
| [@stdlib/blas/ext/base/gcusumors]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/gcusumors | ||
|
|
||
| [@stdlib/blas/ext/base/scusumors]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/scusumors | ||
|
|
||
| <!-- </related-links> --> |
There was a problem hiding this comment.
| <!-- <related-links> --> | |
| [@stdlib/blas/ext/base/dcusum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/dcusum | |
| [@stdlib/blas/ext/base/gcusumors]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/gcusumors | |
| [@stdlib/blas/ext/base/scusumors]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/scusumors | |
| <!-- </related-links> --> | |
| <!-- <related-links> --> | |
| <!-- </related-links> --> |
| "dependencies": [ | ||
| "@stdlib/blas/base/shared", | ||
| "@stdlib/strided/base/stride2offset", | ||
| "@stdlib/math/base/assert/is-nan", | ||
| "@stdlib/math/base/special/abs" |
There was a problem hiding this comment.
| "dependencies": [ | |
| "@stdlib/blas/base/shared", | |
| "@stdlib/strided/base/stride2offset", | |
| "@stdlib/math/base/assert/is-nan", | |
| "@stdlib/math/base/special/abs" | |
| "dependencies": [ | |
| "@stdlib/blas/base/shared", | |
| "@stdlib/strided/base/stride2offset", | |
| "@stdlib/math/base/assert/is-nan" |
| "@stdlib/blas/base/shared", | ||
| "@stdlib/strided/base/stride2offset", | ||
| "@stdlib/math/base/assert/is-nan", | ||
| "@stdlib/math/base/special/abs" |
There was a problem hiding this comment.
| "@stdlib/blas/base/shared", | |
| "@stdlib/strided/base/stride2offset", | |
| "@stdlib/math/base/assert/is-nan", | |
| "@stdlib/math/base/special/abs" | |
| "@stdlib/blas/base/shared", | |
| "@stdlib/strided/base/stride2offset", | |
| "@stdlib/math/base/assert/is-nan" |
| "@stdlib/blas/base/shared", | ||
| "@stdlib/strided/base/stride2offset", | ||
| "@stdlib/napi/export", | ||
| "@stdlib/napi/argv", | ||
| "@stdlib/napi/argv-double", | ||
| "@stdlib/napi/argv-int64", | ||
| "@stdlib/napi/argv-strided-float64array", | ||
| "@stdlib/math/base/assert/is-nan", | ||
| "@stdlib/math/base/special/abs" |
There was a problem hiding this comment.
| "@stdlib/blas/base/shared", | |
| "@stdlib/strided/base/stride2offset", | |
| "@stdlib/napi/export", | |
| "@stdlib/napi/argv", | |
| "@stdlib/napi/argv-double", | |
| "@stdlib/napi/argv-int64", | |
| "@stdlib/napi/argv-strided-float64array", | |
| "@stdlib/math/base/assert/is-nan", | |
| "@stdlib/math/base/special/abs" | |
| "@stdlib/blas/base/shared", | |
| "@stdlib/strided/base/stride2offset", | |
| "@stdlib/napi/export", | |
| "@stdlib/napi/argv", | |
| "@stdlib/napi/argv-double", | |
| "@stdlib/napi/argv-int64", | |
| "@stdlib/napi/argv-strided-float64array", | |
| "@stdlib/math/base/assert/is-nan" |
| }); | ||
|
|
||
| tape( 'the function has an arity of 6', opts, function test( t ) { | ||
| t.strictEqual( dnancusumors.length, 6, 'has expected arity' ); |
There was a problem hiding this comment.
| t.strictEqual( dnancusumors.length, 6, 'has expected arity' ); | |
| t.strictEqual( dnancusumors.length, 6, 'returns expected value' ); |
| for ( i = 0; i < len; i++ ) { | ||
| if ( rand_double() < 0.2 ) { | ||
| x[ i ] = 0.0 / 0.0; // NaN | ||
| } else { | ||
| x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; | ||
| } | ||
| } | ||
| for ( i = 0; i < len; i++ ) { | ||
| y[ i ] = 0.0; | ||
| } |
There was a problem hiding this comment.
| for ( i = 0; i < len; i++ ) { | |
| if ( rand_double() < 0.2 ) { | |
| x[ i ] = 0.0 / 0.0; // NaN | |
| } else { | |
| x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; | |
| } | |
| } | |
| for ( i = 0; i < len; i++ ) { | |
| y[ i ] = 0.0; | |
| } | |
| for ( i = 0; i < len; i++ ) { | |
| if ( rand_double() < 0.2 ) { | |
| x[ i ] = 0.0 / 0.0; // NaN | |
| } else { | |
| x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; | |
| } | |
| y[ i ] = 0.0; | |
| } |
Can be done in single loop
| x = (double *)malloc( len * sizeof(double ) ); | ||
| y = (double *)malloc( len * sizeof(double ) ); |
There was a problem hiding this comment.
| x = (double *)malloc( len * sizeof(double ) ); | |
| y = (double *)malloc( len * sizeof(double ) ); | |
| x = (double *)malloc( len * sizeof( double ) ); | |
| y = (double *)malloc( len * sizeof( double ) ); |
| x = (double *)malloc( len * sizeof(double ) ); | ||
| y = (double *)malloc( len * sizeof(double ) ); |
There was a problem hiding this comment.
| x = (double *)malloc( len * sizeof(double ) ); | |
| y = (double *)malloc( len * sizeof(double ) ); | |
| x = (double *)malloc( len * sizeof( double ) ); | |
| y = (double *)malloc( len * sizeof( double ) ); |
| for ( i = 0; i < len; i++ ) { | ||
| if ( rand_double() < 0.2 ) { | ||
| x[ i ] = 0.0 / 0.0; // NaN | ||
| } else { | ||
| x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; | ||
| } | ||
| } | ||
| for ( i = 0; i < len; i++ ) { | ||
| y[ i ] = 0.0; | ||
| } |
There was a problem hiding this comment.
| for ( i = 0; i < len; i++ ) { | |
| if ( rand_double() < 0.2 ) { | |
| x[ i ] = 0.0 / 0.0; // NaN | |
| } else { | |
| x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; | |
| } | |
| } | |
| for ( i = 0; i < len; i++ ) { | |
| y[ i ] = 0.0; | |
| } | |
| for ( i = 0; i < len; i++ ) { | |
| if ( rand_double() < 0.2 ) { | |
| x[ i ] = 0.0 / 0.0; // NaN | |
| } else { | |
| x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; | |
| } | |
| y[ i ] = 0.0; | |
| } |
Resolves #316
Description
This pull request:
blas/ext/base/dnancusumorsRelated Issues
This pull request has the following related issues:
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
{{TODO: add disclosure if applicable}}
@stdlib-js/reviewers