feat: add blas/ext/base/snancusumpw#9810
feat: add blas/ext/base/snancusumpw#9810MeKaustubh07 wants to merge 7 commits intostdlib-js:developfrom
blas/ext/base/snancusumpw#9810Conversation
Coverage Report
The above coverage report was generated for the changes in this PR. |
| /** | ||
| * Computes the cumulative sum of single-precision floating-point strided array elements ignoring `NaN` values and using pairwise summation. | ||
| */ | ||
| void API_SUFFIX( stdlib_strided_snancusumpw )( const CBLAS_INT N, const float sum, const float *X, const CBLAS_INT strideX, float *Y, const CBLAS_INT strideY ); |
There was a problem hiding this comment.
The API_SUFFIX macro is called with spaces around the argument here and on line 39, but the rest of the codebase uses no spaces (e.g., API_SUFFIX(stdlib_strided_scusumpw)).
| void API_SUFFIX( stdlib_strided_snancusumpw )( const CBLAS_INT N, const float sum, const float *X, const CBLAS_INT strideX, float *Y, const CBLAS_INT strideY ); | |
| void API_SUFFIX(stdlib_strided_snancusumpw)( const CBLAS_INT N, const float sum, const float *X, const CBLAS_INT strideX, float *Y, const CBLAS_INT strideY ); |
| /** | ||
| * Computes the cumulative sum of single-precision floating-point strided array elements ignoring `NaN` values and using pairwise summation and alternative indexing semantics. | ||
| */ | ||
| void API_SUFFIX( stdlib_strided_snancusumpw_ndarray )( const CBLAS_INT N, const float sum, const float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, float *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY ); |
There was a problem hiding this comment.
Same spacing issue here - should match the codebase convention with no spaces inside API_SUFFIX().
| void API_SUFFIX( stdlib_strided_snancusumpw_ndarray )( const CBLAS_INT N, const float sum, const float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, float *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY ); | |
| void API_SUFFIX(stdlib_strided_snancusumpw_ndarray)( const CBLAS_INT N, const float sum, const float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, float *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY ); |
| #include <node_api.h> | ||
| #include "stdlib/blas/base/shared.h" | ||
| #include "stdlib/blas/ext/base/snancusumpw.h" | ||
| #include "stdlib/napi/argv.h" | ||
| #include "stdlib/napi/argv_float.h" | ||
| #include "stdlib/napi/argv_int64.h" | ||
| #include "stdlib/napi/argv_strided_float32array.h" | ||
| #include "stdlib/napi/export.h" |
There was a problem hiding this comment.
The include order here doesn't match stdlib conventions. The package's own header should come first, then stdlib dependencies, then system headers. The correct order would be:
#include "stdlib/blas/ext/base/snancusumpw.h"
#include "stdlib/blas/base/shared.h"
#include "stdlib/napi/export.h"
#include "stdlib/napi/argv.h"
#include "stdlib/napi/argv_float.h"
#include "stdlib/napi/argv_int64.h"
#include "stdlib/napi/argv_strided_float32array.h"
#include <node_api.h>See scusumpw/src/addon.c for reference.
| STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 5 ); | ||
| STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, strideX, argv, 2 ); | ||
| STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, Y, N, strideY, argv, 4 ); | ||
| API_SUFFIX( stdlib_strided_snancusumpw )( N, sum, X, strideX, Y, strideY ); |
There was a problem hiding this comment.
Same API_SUFFIX spacing issue - no spaces inside the parentheses.
| API_SUFFIX( stdlib_strided_snancusumpw )( N, sum, X, strideX, Y, strideY ); | |
| API_SUFFIX(stdlib_strided_snancusumpw)( N, sum, X, strideX, Y, strideY ); |
| STDLIB_NAPI_ARGV_INT64( env, offsetY, argv, 7 ); | ||
| STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, strideX, argv, 2 ); | ||
| STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, Y, N, strideY, argv, 5 ); | ||
| API_SUFFIX( stdlib_strided_snancusumpw_ndarray )( N, sum, X, strideX, offsetX, Y, strideY, offsetY ); |
There was a problem hiding this comment.
Same API_SUFFIX spacing issue here.
| API_SUFFIX( stdlib_strided_snancusumpw_ndarray )( N, sum, X, strideX, offsetX, Y, strideY, offsetY ); | |
| API_SUFFIX(stdlib_strided_snancusumpw_ndarray)( N, sum, X, strideX, offsetX, Y, strideY, offsetY ); |
|
@Planeshifter Done with the suggested changes , Happy to address any further feedback, and I’ll apply the same updates to similar cases as needed. |
62d0273 to
7ac746d
Compare
Resolves #315 .
Description
This pull request:
blas/ext/base/snancusumpwRelated Issues
This pull request has the following related issues:
blas/ext/base/snancusumpw#315Questions
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