Skip to content

Commit 508e136

Browse files
committed
fix: add missing API_SUFFIX wrappers to internal _ndarray calls
Propagates fixes from a65e1fd ("fix: add suffix wrappers and replace inline NaN literal") and 8516750 ("fix: add missing suffix wrappers") to sibling packages whose `API_SUFFIX`-wrapped routines call other `API_SUFFIX`-wrapped strided routines without the macro. Affected packages: - `blas/ext/base/snansumpw` - `blas/ext/base/ssumpw` - `stats/strided/dsempn` - `stats/strided/dsmeanpn` - `stats/strided/dsvariancepn` - `stats/strided/dztest` - `stats/strided/dztest2` - `stats/strided/sztest` - `stats/strided/sztest2`
1 parent c5fad82 commit 508e136

9 files changed

Lines changed: 12 additions & 12 deletions

File tree

lib/node_modules/@stdlib/blas/ext/base/snansumpw/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,5 +149,5 @@ float API_SUFFIX(stdlib_strided_snansumpw_ndarray)( const CBLAS_INT N, const flo
149149
// Recurse by dividing by two, but avoiding non-multiples of unroll factor...
150150
n = N / 2;
151151
n -= n % 8;
152-
return stdlib_strided_snansumpw_ndarray( n, X, strideX, ix ) + stdlib_strided_snansumpw_ndarray( N-n, X, strideX, ix+(n*strideX) );
152+
return API_SUFFIX(stdlib_strided_snansumpw_ndarray)( n, X, strideX, ix ) + API_SUFFIX(stdlib_strided_snansumpw_ndarray)( N-n, X, strideX, ix+(n*strideX) );
153153
}

lib/node_modules/@stdlib/blas/ext/base/ssumpw/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,5 @@ float API_SUFFIX(stdlib_strided_ssumpw_ndarray)( const CBLAS_INT N, const float
128128
// Recurse by dividing by two, but avoiding non-multiples of unroll factor...
129129
n = N / 2;
130130
n -= n % 8;
131-
return stdlib_strided_ssumpw_ndarray( n, X, strideX, ix ) + stdlib_strided_ssumpw_ndarray( N-n, X, strideX, ix+(n*strideX) );
131+
return API_SUFFIX(stdlib_strided_ssumpw_ndarray)( n, X, strideX, ix ) + API_SUFFIX(stdlib_strided_ssumpw_ndarray)( N-n, X, strideX, ix+(n*strideX) );
132132
}

lib/node_modules/@stdlib/stats/strided/dsempn/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ double API_SUFFIX(stdlib_strided_dsempn)( const CBLAS_INT N, const double correc
4747
* @return output value
4848
*/
4949
double API_SUFFIX(stdlib_strided_dsempn_ndarray)( const CBLAS_INT N, const double correction, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ) {
50-
return stdlib_base_sqrt( stdlib_strided_dvariancepn_ndarray( N, correction, X, strideX, offsetX ) / (double)N );
50+
return stdlib_base_sqrt( API_SUFFIX(stdlib_strided_dvariancepn_ndarray)( N, correction, X, strideX, offsetX ) / (double)N );
5151
}

lib/node_modules/@stdlib/stats/strided/dsmeanpn/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ double API_SUFFIX(stdlib_strided_dsmeanpn_ndarray)( const CBLAS_INT N, const flo
6767
dN = (double)N;
6868

6969
// Compute an estimate for the mean:
70-
mu = stdlib_strided_dssum_ndarray( N, X, strideX, offsetX );
70+
mu = API_SUFFIX(stdlib_strided_dssum_ndarray)( N, X, strideX, offsetX );
7171
mu /= dN;
7272

7373
// Compute an error term:
74-
c = stdlib_strided_dsapxsum_ndarray( N, -mu, X, strideX, offsetX );
74+
c = API_SUFFIX(stdlib_strided_dsapxsum_ndarray)( N, -mu, X, strideX, offsetX );
7575
c /= dN;
7676

7777
return mu + c;

lib/node_modules/@stdlib/stats/strided/dsvariancepn/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ double API_SUFFIX(stdlib_strided_dsvariancepn_ndarray)( const CBLAS_INT N, const
7373
return 0.0;
7474
}
7575
// Compute an estimate for the mean:
76-
mu = stdlib_strided_dssum_ndarray( N, X, strideX, offsetX ) / dN;
76+
mu = API_SUFFIX(stdlib_strided_dssum_ndarray)( N, X, strideX, offsetX ) / dN;
7777

7878
// Compute the variance...
7979
ix = offsetX;

lib/node_modules/@stdlib/stats/strided/dztest/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void API_SUFFIX(stdlib_strided_dztest_ndarray)( const CBLAS_INT N, const enum ST
9898
stderr = sigma / stdlib_base_sqrt( (double)N );
9999

100100
// Compute the arithmetic mean of the input array:
101-
xmean = stdlib_strided_dmean_ndarray( N, X, strideX, offsetX );
101+
xmean = API_SUFFIX(stdlib_strided_dmean_ndarray)( N, X, strideX, offsetX );
102102

103103
// Compute the test statistic (i.e., the z-score, which is the distance of the sample mean from the population mean in units of standard error):
104104
stat = ( xmean - mu ) / stderr;

lib/node_modules/@stdlib/stats/strided/dztest2/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ void API_SUFFIX(stdlib_strided_dztest2_ndarray)( const CBLAS_INT NX, const CBLAS
117117
stderr = stdlib_base_sqrt( ( xvar / (double)NX ) + ( yvar / (double)NY ) );
118118

119119
// Compute the arithmetic means of the input arrays:
120-
xmean = stdlib_strided_dmean_ndarray( NX, X, strideX, offsetX );
121-
ymean = stdlib_strided_dmean_ndarray( NY, Y, strideY, offsetY );
120+
xmean = API_SUFFIX(stdlib_strided_dmean_ndarray)( NX, X, strideX, offsetX );
121+
ymean = API_SUFFIX(stdlib_strided_dmean_ndarray)( NY, Y, strideY, offsetY );
122122

123123
// Compute the test statistic (i.e., the z-score, which is the standardized difference between the sample means of x and y, adjusted by the hypothesized difference, in units of the standard error):
124124
stat = ( xmean - ymean - diff ) / stderr;

lib/node_modules/@stdlib/stats/strided/sztest/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void API_SUFFIX(stdlib_strided_sztest_ndarray)( const CBLAS_INT N, const enum ST
9898
stderr = sigma / stdlib_base_sqrt( (double)N ); // note: intentionally evaluated in double-precision to avoid `N` exceeding max safe float32 integer
9999

100100
// Compute the arithmetic mean of the input array:
101-
xmean = stdlib_strided_smean_ndarray( N, X, strideX, offsetX );
101+
xmean = API_SUFFIX(stdlib_strided_smean_ndarray)( N, X, strideX, offsetX );
102102

103103
// Compute the test statistic (i.e., the z-score, which is the distance of the sample mean from the population mean in units of standard error):
104104
stat = ( (double)xmean - (double)mu ) / stderr;

lib/node_modules/@stdlib/stats/strided/sztest2/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ void API_SUFFIX(stdlib_strided_sztest2_ndarray)( const CBLAS_INT NX, const CBLAS
117117
stderr = stdlib_base_sqrt( ( xvar / (double)NX ) + ( yvar / (double)NY ) ); // note: intentionally evaluated in double-precision to avoid `NX` and `NY` exceeding max safe float32 integer
118118

119119
// Compute the arithmetic means of the input arrays:
120-
xmean = stdlib_strided_smean_ndarray( NX, X, strideX, offsetX );
121-
ymean = stdlib_strided_smean_ndarray( NY, Y, strideY, offsetY );
120+
xmean = API_SUFFIX(stdlib_strided_smean_ndarray)( NX, X, strideX, offsetX );
121+
ymean = API_SUFFIX(stdlib_strided_smean_ndarray)( NY, Y, strideY, offsetY );
122122

123123
// Compute the test statistic (i.e., the z-score, which is the standardized difference between the sample means of x and y, adjusted by the hypothesized difference, in units of the standard error):
124124
stat = ( (double)xmean - (double)ymean - (double)diff ) / stderr;

0 commit comments

Comments
 (0)