Skip to content

Commit d7abeb4

Browse files
committed
Rename typedef to avoid name clashes in downstream usage
1 parent 241deaf commit d7abeb4

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

lib/node_modules/@stdlib/ndarray/base/unary/include/stdlib/ndarray/base/unary/dispatch_object.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extern "C" {
3737
* #include <stdlib.h>
3838
* #include <stdio.h>
3939
*
40-
* ndarrayFcn functions[] = {
40+
* ndarrayUnaryFcn functions[] = {
4141
* stdlib_ndarray_b_b_0d,
4242
* stdlib_ndarray_b_b_1d,
4343
* stdlib_ndarray_b_b_2d,
@@ -52,7 +52,7 @@ extern "C" {
5252
* stdlib_ndarray_b_b_nd
5353
* };
5454
55-
* ndarrayFcn blocked_functions[] = {
55+
* ndarrayUnaryFcn blocked_functions[] = {
5656
* stdlib_ndarray_b_b_2d_blocked,
5757
* stdlib_ndarray_b_b_3d_blocked,
5858
* stdlib_ndarray_b_b_4d_blocked,
@@ -75,13 +75,13 @@ extern "C" {
7575
*/
7676
struct ndarrayUnaryDispatchObject {
7777
// Array containing unary ndarray functions for performing element-wise computation:
78-
ndarrayFcn *functions;
78+
ndarrayUnaryFcn *functions;
7979

8080
// Number of unary ndarray functions:
8181
int32_t nfunctions;
8282

8383
// Array containing unary ndarray functions for performing element-wise computation using loop blocking:
84-
ndarrayFcn *blocked_functions;
84+
ndarrayUnaryFcn *blocked_functions;
8585

8686
// Number of blocked unary ndarray functions:
8787
int32_t nblockedfunctions;

lib/node_modules/@stdlib/ndarray/base/unary/include/stdlib/ndarray/base/unary/typedefs.h

+6-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@
2424
#include <stdint.h>
2525

2626
/**
27-
* Function pointer type for an ndarray function.
27+
* Function pointer type for a unary ndarray function.
28+
*
29+
* ## Note
30+
*
31+
* - This must match the definition of an `ndarrayFcn` found in `@stdlib/ndarray/base/function-object`.
2832
*
2933
* @param arrays array containing pointers to input and output ndarrays
3034
* @param data function "data" (e.g., a callback)
3135
* @return status code
3236
*/
33-
typedef int8_t (*ndarrayFcn)( struct ndarray *arrays[], void *data );
37+
typedef int8_t (*ndarrayUnaryFcn)( struct ndarray *arrays[], void *data );
3438

3539
#endif // !STDLIB_NDARRAY_BASE_UNARY_TYPEDEFS_H

lib/node_modules/@stdlib/ndarray/base/unary/src/b_b.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1986,7 +1986,7 @@ int8_t stdlib_ndarray_b_b_nd( struct ndarray *arrays[], void *fcn ) {
19861986
}
19871987

19881988
// Define a list of unary ndarray functions:
1989-
static ndarrayFcn functions[] = {
1989+
static ndarrayUnaryFcn functions[] = {
19901990
stdlib_ndarray_b_b_0d,
19911991
stdlib_ndarray_b_b_1d,
19921992
stdlib_ndarray_b_b_2d,
@@ -2002,7 +2002,7 @@ static ndarrayFcn functions[] = {
20022002
};
20032003

20042004
// Define a list of unary ndarray functions implementing loop blocking...
2005-
static ndarrayFcn blocked_functions[] = {
2005+
static ndarrayUnaryFcn blocked_functions[] = {
20062006
stdlib_ndarray_b_b_2d_blocked,
20072007
stdlib_ndarray_b_b_3d_blocked,
20082008
stdlib_ndarray_b_b_4d_blocked,

lib/node_modules/@stdlib/ndarray/base/unary/src/dispatch.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* @param fcn callback
4040
* @return status code
4141
*/
42-
static int8_t stdlib_ndarray_unary_1d_squeeze( const ndarrayFcn f, struct ndarray *x1, struct ndarray *x2, const int64_t i, void *fcn ) {
42+
static int8_t stdlib_ndarray_unary_1d_squeeze( const ndarrayUnaryFcn f, struct ndarray *x1, struct ndarray *x2, const int64_t i, void *fcn ) {
4343
int64_t sh[] = { stdlib_ndarray_shape( x1 )[ i ] };
4444

4545
// Shallow copy and reshape the arrays...
@@ -104,7 +104,7 @@ static int8_t stdlib_ndarray_unary_1d_squeeze( const ndarrayFcn f, struct ndarra
104104
* @param fcn callback
105105
* @return status code
106106
*/
107-
static int8_t stdlib_ndarray_unary_1d_flatten( const ndarrayFcn f, const int64_t N, struct ndarray *x1, const int64_t s1, struct ndarray *x2, const int64_t s2, void *fcn ) {
107+
static int8_t stdlib_ndarray_unary_1d_flatten( const ndarrayUnaryFcn f, const int64_t N, struct ndarray *x1, const int64_t s1, struct ndarray *x2, const int64_t s2, void *fcn ) {
108108
// Define the (flattened) strided array shape:
109109
int64_t sh[] = { N };
110110

@@ -176,7 +176,7 @@ static int8_t stdlib_ndarray_unary_1d_flatten( const ndarrayFcn f, const int64_t
176176
* #include <stdio.h>
177177
*
178178
* // Define a list of unary ndarray functions:
179-
* ndarrayFcn functions[] = {
179+
* ndarrayUnaryFcn functions[] = {
180180
* stdlib_ndarray_b_b_0d,
181181
* stdlib_ndarray_b_b_1d,
182182
* stdlib_ndarray_b_b_2d,
@@ -192,7 +192,7 @@ static int8_t stdlib_ndarray_unary_1d_flatten( const ndarrayFcn f, const int64_t
192192
* };
193193
*
194194
* // Define a list of unary ndarray functions using loop blocking...
195-
* ndarrayFcn blocked_functions[] = {
195+
* ndarrayUnaryFcn blocked_functions[] = {
196196
* stdlib_ndarray_b_b_2d_blocked,
197197
* stdlib_ndarray_b_b_3d_blocked,
198198
* stdlib_ndarray_b_b_4d_blocked,

0 commit comments

Comments
 (0)