Skip to content

Commit 88d4913

Browse files
committed
fix: apply code review suggestions
1 parent 6ed9368 commit 88d4913

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Computes the sum of double-precision floating-point strided array elements, igno
196196

197197
```c
198198
const double x[] = { 1.0, 2.0, 0.0/0.0, 4.0 };
199-
int n = 0;
199+
CBLAS_INT n = 0;
200200

201201
double v = stdlib_strided_dnannsumkbn( 4, x, 1, &n );
202202
// returns 7.0
@@ -219,7 +219,7 @@ Computes the sum of double-precision floating-point strided array elements, igno
219219

220220
```c
221221
const double x[] = { 1.0, 2.0, 0.0/0.0, 4.0 };
222-
int n = 0;
222+
CBLAS_INT n = 0;
223223

224224
double v = stdlib_strided_dnannsumkbn_ndarray( 4, x, 1, 0, &n );
225225
// returns 7.0
@@ -257,6 +257,7 @@ double stdlib_strided_dnannsumkbn_ndarray( const CBLAS_INT N, const double *X, c
257257

258258
```c
259259
#include "stdlib/blas/ext/base/dnannsumkbn.h"
260+
#include "stdlib/blase/base/shared.h"
260261
#include <stdio.h>
261262

262263
int main( void ) {
@@ -270,7 +271,7 @@ int main( void ) {
270271
const int strideX = 2;
271272

272273
// Initialize a variable for storing the number of non-NaN elements:
273-
int n = 0;
274+
CBLAS_INT n = 0;
274275

275276
// Compute the sum:
276277
double v = stdlib_strided_dnannsumkbn( N, x, strideX, &n );

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*/
1818

1919
#include "stdlib/blas/ext/base/dnannsumkbn.h"
20+
#include "stdlib/blas/base/shared.h"
2021
#include <stdlib.h>
2122
#include <stdio.h>
2223
#include <math.h>
@@ -97,7 +98,7 @@ static double rand_double( void ) {
9798
static double benchmark1( int iterations, int len ) {
9899
double elapsed;
99100
double x[ len ];
100-
int n;
101+
CBLAS_INT n;
101102
double v;
102103
double t;
103104
int i;
@@ -136,7 +137,7 @@ static double benchmark1( int iterations, int len ) {
136137
static double benchmark2( int iterations, int len ) {
137138
double elapsed;
138139
double x[ len ];
139-
int n;
140+
CBLAS_INT n;
140141
double v;
141142
double t;
142143
int i;

lib/node_modules/@stdlib/blas/ext/base/dnannsumkbn/examples/c/example.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*/
1818

1919
#include "stdlib/blas/ext/base/dnannsumkbn.h"
20+
#include "stdlib/blas/base/shared.h"
2021
#include <stdio.h>
2122

2223
int main( void ) {
@@ -30,7 +31,7 @@ int main( void ) {
3031
const int strideX = 2;
3132

3233
// Initialize a variable for storing the number of non-NaN elements:
33-
int n = 0;
34+
CBLAS_INT n = 0;
3435

3536
// Compute the sum:
3637
double v = stdlib_strided_dnannsumkbn( N, x, strideX, &n );

lib/node_modules/@stdlib/blas/ext/base/dnannsumkbn/src/addon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
4747
}
4848

4949
double *out = Out;
50-
int n;
50+
CBLAS_INT n;
5151
out[ io ] = API_SUFFIX(stdlib_strided_dnannsumkbn)( N, X, strideX, &n );
5252
out[ io+strideOut ] = (double)n;
5353

@@ -73,7 +73,7 @@ static napi_value addon_method( napi_env env, napi_callback_info info ) {
7373

7474
int io = offsetOut;
7575
double *out = Out;
76-
int n;
76+
CBLAS_INT n;
7777
out[ io ] = API_SUFFIX(stdlib_strided_dnannsumkbn_ndarray)( N, X, strideX, offsetX, &n );
7878
out[ io+strideOut ] = (double)n;
7979

0 commit comments

Comments
 (0)