From f9c7fa188a8af24be6192830b23f8e2210579f45 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 2 May 2026 12:44:57 +0000 Subject: [PATCH] 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 --- .../@stdlib/stats/strided/dpcorr/benchmark/c/benchmark.length.c | 2 +- lib/node_modules/@stdlib/stats/strided/dpcorr/src/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/strided/dpcorr/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dpcorr/benchmark/c/benchmark.length.c index 78f63b2c8216..cc80e24f11b8 100644 --- a/lib/node_modules/@stdlib/stats/strided/dpcorr/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dpcorr/benchmark/c/benchmark.length.c @@ -152,7 +152,7 @@ static double benchmark2( int iterations, int len ) { c = 0.0; t = tic(); for ( i = 0; i < iterations; i++ ) { - c = stdlib_strided_dpcorr_ndarray( len, x, 1, 0, x, 1, 0 ); + c = stdlib_strided_dpcorr_ndarray( len, x, 1, 0, y, 1, 0 ); if ( c != c ) { printf( "should not return NaN\n" ); break; diff --git a/lib/node_modules/@stdlib/stats/strided/dpcorr/src/main.c b/lib/node_modules/@stdlib/stats/strided/dpcorr/src/main.c index 5c27be531cbb..76307d0546cf 100644 --- a/lib/node_modules/@stdlib/stats/strided/dpcorr/src/main.c +++ b/lib/node_modules/@stdlib/stats/strided/dpcorr/src/main.c @@ -50,5 +50,5 @@ double API_SUFFIX(stdlib_strided_dpcorr)( const CBLAS_INT N, const double *X, co * @return output value */ 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 ) { - return stdlib_strided_dpcorrwd_ndarray( N, X, strideX, offsetX, Y, strideY, offsetY ); + return API_SUFFIX(stdlib_strided_dpcorrwd_ndarray)( N, X, strideX, offsetX, Y, strideY, offsetY ); }