Skip to content

Commit 9d55639

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

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

lib/node_modules/@stdlib/blas/ext/base/sfill/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/sfill.h"
169169
```
170170

171-
#### c_sfill( N, alpha, \*X, strideX )
171+
#### stdlib_strided_sfill( N, alpha, \*X, strideX )
172172

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

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

178-
c_sfill( 4, 5.0f, x, 1 );
178+
stdlib_strided_sfill( 4, 5.0f, x, 1 );
179179

180180
```
181181
@@ -187,17 +187,17 @@ The function accepts the following arguments:
187187
- **strideX**: `[in] CBLAS_INT` index increment for `X`.
188188
189189
```c
190-
void c_sfill( const CBLAS_INT N, const float alpha, float *X, const CBLAS_INT strideX );
190+
void stdlib_strided_sfill( const CBLAS_INT N, const float alpha, float *X, const CBLAS_INT strideX );
191191
```
192192

193-
#### c_sfill_ndarray( N, alpha, \*X, strideX, offsetX )
193+
#### stdlib_strided_sfill_ndarray( N, alpha, \*X, strideX, offsetX )
194194

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

197197
```c
198198
float x[] = { 1.0f, 2.0f, 3.0f, 4.0f };
199199

200-
c_sfill_ndarray( 4, 5.0f, x, 1, 0 );
200+
stdlib_strided_sfill_ndarray( 4, 5.0f, x, 1, 0 );
201201
```
202202
203203
The function accepts the following arguments:
@@ -209,7 +209,7 @@ The function accepts the following arguments:
209209
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
210210
211211
```c
212-
void c_sfill_ndarray( const CBLAS_INT N, const float alpha, float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX );
212+
void stdlib_strided_sfill_ndarray( const CBLAS_INT N, const float alpha, float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX );
213213
```
214214

215215
</section>
@@ -245,7 +245,7 @@ int main( void ) {
245245
const int strideX = 1;
246246

247247
// Fill the array:
248-
c_sfill( N, 5.0f, x, strideX );
248+
stdlib_strided_sfill( N, 5.0f, x, strideX );
249249

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

lib/node_modules/@stdlib/blas/ext/base/sfill/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_sfill( len, (float)i, x, 1 );
108+
stdlib_strided_sfill( len, (float)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_sfill_ndarray( len, (float)i, x, 1, 0 );
139+
stdlib_strided_sfill_ndarray( len, (float)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/sfill/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_sfill( N, 5.0f, x, strideX );
33+
stdlib_strided_sfill( N, 5.0f, x, strideX );
3434

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

lib/node_modules/@stdlib/blas/ext/base/sfill/examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
2222
var sfill = require( './../lib' );
2323

24-
var x = discreteUniform( 10, -100, {
24+
var x = discreteUniform( 10, -100, 100, {
2525
'dtype': 'float32'
2626
});
2727
console.log( x );

lib/node_modules/@stdlib/blas/ext/base/sfill/include/stdlib/blas/ext/base/sfill.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 single-precision floating-point strided array with a specified scalar constant.
3333
*/
34-
void API_SUFFIX(c_sfill)( const CBLAS_INT N, const float alpha, float *X, const CBLAS_INT strideX );
34+
void API_SUFFIX(stdlib_strided_sfill)( const CBLAS_INT N, const float alpha, float *X, const CBLAS_INT strideX );
3535

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

4141
#ifdef __cplusplus
4242
}

lib/node_modules/@stdlib/blas/ext/base/sfill/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_FLOAT( env, alpha, argv, 1 );
3939
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 );
4040
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, strideX, argv, 2 );
41-
API_SUFFIX(c_sfill)( N, alpha, X, strideX );
41+
API_SUFFIX(stdlib_strided_sfill)( 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_FLOAT32ARRAY( env, X, N, strideX, argv, 2 );
59-
API_SUFFIX(c_sfill_ndarray)( N, alpha, X, strideX, offsetX );
59+
API_SUFFIX(stdlib_strided_sfill_ndarray)( N, alpha, X, strideX, offsetX );
6060
return NULL;
6161
}
6262

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
* @param strideX index increment
3030
*/
3131

32-
void API_SUFFIX(c_sfill)( const CBLAS_INT N, const float alpha, float *X, const CBLAS_INT strideX ) {
32+
void API_SUFFIX(stdlib_strided_sfill)( const CBLAS_INT N, const float alpha, float *X, const CBLAS_INT strideX ) {
3333
CBLAS_INT ox = stdlib_strided_stride2offset( N, strideX );
34-
API_SUFFIX(c_sfill_ndarray)( N, alpha, X, strideX, ox );
34+
API_SUFFIX(stdlib_strided_sfill_ndarray)( N, alpha, X, strideX, ox );
3535
}
3636

3737
/**
@@ -43,7 +43,7 @@ void API_SUFFIX(c_sfill)( const CBLAS_INT N, const float alpha, float *X, const
4343
* @param strideX index increment
4444
* @param offsetX starting index
4545
*/
46-
void API_SUFFIX(c_sfill_ndarray)( const CBLAS_INT N, const float alpha, float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ) {
46+
void API_SUFFIX(stdlib_strided_sfill_ndarray)( const CBLAS_INT N, const float alpha, float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ) {
4747
CBLAS_INT ix;
4848
CBLAS_INT m;
4949
CBLAS_INT i;

0 commit comments

Comments
 (0)