Skip to content

Commit 1f49ad9

Browse files
authored
fix: update C function names in blas/ext/base/dfill to prevent name collisions
PR-URL: #2944 Reviewed-by: Athan Reines <[email protected]>
1 parent 5467341 commit 1f49ad9

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,14 @@ console.log( x );
168168
#include "stdlib/blas/ext/base/dfill.h"
169169
```
170170

171-
#### c_dfill( N, alpha, \*X, strideX )
171+
#### stdlib_strided_dfill( N, alpha, \*X, strideX )
172172

173173
Fills a double-precision floating-point strided array `X` with a specified scalar constant `alpha`.
174174

175175
```c
176176
double x[] = { 1.0, 2.0, 3.0, 4.0 };
177177

178-
c_dfill( 4, 5.0, x, 1 );
178+
stdlib_strided_dfill( 4, 5.0, x, 1 );
179179
```
180180
181181
The function accepts the following arguments:
@@ -186,17 +186,17 @@ The function accepts the following arguments:
186186
- **strideX**: `[in] CBLAS_INT` index increment for `X`.
187187
188188
```c
189-
void c_dfill( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX );
189+
void stdlib_strided_dfill( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX );
190190
```
191191

192-
#### c_dfill_ndarray( N, alpha, \*X, strideX, offsetX )
192+
#### stdlib_strided_dfill_ndarray( N, alpha, \*X, strideX, offsetX )
193193

194194
Fills a double-precision floating-point strided array `X` with a specified scalar constant `alpha` using alternative indexing semantics.
195195

196196
```c
197197
double x[] = { 1.0, 2.0, 3.0, 4.0 };
198198

199-
c_dfill_ndarray( 4, 5.0, x, 1, 0 );
199+
stdlib_strided_dfill_ndarray( 4, 5.0, x, 1, 0 );
200200
```
201201
202202
The function accepts the following arguments:
@@ -208,7 +208,7 @@ The function accepts the following arguments:
208208
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
209209
210210
```c
211-
void c_dfill_ndarray( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX );
211+
void stdlib_strided_dfill_ndarray( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX );
212212
```
213213

214214
</section>
@@ -244,7 +244,7 @@ int main( void ) {
244244
const int strideX = 1;
245245

246246
// Fill the array:
247-
c_dfill( N, 5.0, x, strideX );
247+
stdlib_strided_dfill( N, 5.0, x, strideX );
248248

249249
// Print the result:
250250
for ( int i = 0; i < 8; i++ ) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static double benchmark1( int iterations, int len ) {
105105
}
106106
t = tic();
107107
for ( i = 0; i < iterations; i++ ) {
108-
c_dfill( len, i, x, 1 );
108+
stdlib_strided_dfill( len, i, x, 1 );
109109
if ( x[ 0 ] != x[ 0 ] ) {
110110
printf( "should not return NaN\n" );
111111
break;
@@ -136,7 +136,7 @@ static double benchmark2( int iterations, int len ) {
136136
}
137137
t = tic();
138138
for ( i = 0; i < iterations; i++ ) {
139-
c_dfill_ndarray( len, i, x, 1, 0 );
139+
stdlib_strided_dfill_ndarray( len, i, x, 1, 0 );
140140
if ( x[ 0 ] != x[ 0 ] ) {
141141
printf( "should not return NaN\n" );
142142
break;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ int main( void ) {
3030
const int strideX = 1;
3131

3232
// Fill the array:
33-
c_dfill( N, 5.0, x, strideX );
33+
stdlib_strided_dfill( N, 5.0, x, strideX );
3434

3535
// Print the result:
3636
for ( int i = 0; i < 8; i++ ) {

lib/node_modules/@stdlib/blas/ext/base/dfill/include/stdlib/blas/ext/base/dfill.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ extern "C" {
3131
/**
3232
* Fills a double-precision floating-point strided array with a specified scalar constant.
3333
*/
34-
void API_SUFFIX(c_dfill)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX );
34+
void API_SUFFIX(stdlib_strided_dfill)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX );
3535

3636
/**
3737
* Fills a double-precision floating-point strided array with a specified scalar constant using alternative indexing semantics.
3838
*/
39-
void API_SUFFIX(c_dfill_ndarray)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX );
39+
void API_SUFFIX(stdlib_strided_dfill_ndarray)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX );
4040

4141
#ifdef __cplusplus
4242
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
3838
STDLIB_NAPI_ARGV_DOUBLE( env, alpha, argv, 1 );
3939
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 );
4040
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 2 );
41-
API_SUFFIX(c_dfill)( N, alpha, X, strideX );
41+
API_SUFFIX(stdlib_strided_dfill)( N, alpha, X, strideX );
4242
return NULL;
4343
}
4444

@@ -56,7 +56,7 @@ static napi_value addon_method( napi_env env, napi_callback_info info ) {
5656
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 );
5757
STDLIB_NAPI_ARGV_INT64( env, offsetX, argv, 4 );
5858
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 2 );
59-
API_SUFFIX(c_dfill_ndarray)( N, alpha, X, strideX, offsetX );
59+
API_SUFFIX(stdlib_strided_dfill_ndarray)( N, alpha, X, strideX, offsetX );
6060
return NULL;
6161
}
6262

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
* @param X input array
2929
* @param strideX index increment
3030
*/
31-
void API_SUFFIX(c_dfill)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX ) {
31+
void API_SUFFIX(stdlib_strided_dfill)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX ) {
3232
CBLAS_INT ox = stdlib_strided_stride2offset( N, strideX );
33-
API_SUFFIX(c_dfill_ndarray)( N, alpha, X, strideX, ox );
33+
API_SUFFIX(stdlib_strided_dfill_ndarray)( N, alpha, X, strideX, ox );
3434
}
3535

3636
/**
@@ -42,7 +42,7 @@ void API_SUFFIX(c_dfill)( const CBLAS_INT N, const double alpha, double *X, cons
4242
* @param strideX index increment
4343
* @param offsetX starting index
4444
*/
45-
void API_SUFFIX(c_dfill_ndarray)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ) {
45+
void API_SUFFIX(stdlib_strided_dfill_ndarray)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ) {
4646
CBLAS_INT ix;
4747
CBLAS_INT m;
4848
CBLAS_INT i;

0 commit comments

Comments
 (0)