Skip to content

Commit f9c7fa1

Browse files
committed
fix: correct C delegation and benchmark inputs in stats/strided/dpcorr
* In `src/main.c`, wrap the delegated `stdlib_strided_dpcorrwd_ndarray` call with `API_SUFFIX(...)` so the symbol resolves correctly when the 64-bit indexing ABI is selected (matches the sibling pattern in `stats/strided/dvariance/src/main.c`). * In `benchmark/c/benchmark.length.c`, pass `y` (not `x` twice) as the second strided array in `benchmark2`, otherwise the benchmark correlates `x` with itself and the allocated `y` is unused. https://claude.ai/code/session_012VgKGaXwsACnoLu7UenrRc
1 parent 6b8823e commit f9c7fa1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/node_modules/@stdlib/stats/strided/dpcorr/benchmark/c/benchmark.length.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ static double benchmark2( int iterations, int len ) {
152152
c = 0.0;
153153
t = tic();
154154
for ( i = 0; i < iterations; i++ ) {
155-
c = stdlib_strided_dpcorr_ndarray( len, x, 1, 0, x, 1, 0 );
155+
c = stdlib_strided_dpcorr_ndarray( len, x, 1, 0, y, 1, 0 );
156156
if ( c != c ) {
157157
printf( "should not return NaN\n" );
158158
break;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@ double API_SUFFIX(stdlib_strided_dpcorr)( const CBLAS_INT N, const double *X, co
5050
* @return output value
5151
*/
5252
double API_SUFFIX(stdlib_strided_dpcorr_ndarray)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const double *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY ) {
53-
return stdlib_strided_dpcorrwd_ndarray( N, X, strideX, offsetX, Y, strideY, offsetY );
53+
return API_SUFFIX(stdlib_strided_dpcorrwd_ndarray)( N, X, strideX, offsetX, Y, strideY, offsetY );
5454
}

0 commit comments

Comments
 (0)