Skip to content

Commit 0b34cb6

Browse files
committed
Rename struct
1 parent 89e391a commit 0b34cb6

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

lib/node_modules/@stdlib/ndarray/ctor/benchmark/c/benchmark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ double benchmark() {
105105
int64_t strides[] = { 2, 1 };
106106
uint64_t offset = 0;
107107

108-
struct stdlib_ndarray *arr;
108+
struct ndarray *arr;
109109

110110
t = tic();
111111
for ( i = 0; i < ITERATIONS; i++ ) {

lib/node_modules/@stdlib/ndarray/ctor/examples/c/example.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
int main() {
2929
// Manually create an ndarray...
30-
struct stdlib_ndarray *x = malloc( sizeof( struct stdlib_ndarray ) );
30+
struct ndarray *x = malloc( sizeof( struct ndarray ) );
3131
if ( x == NULL ) {
3232
printf( "Error allocating memory.\n" );
3333
exit( 1 );
@@ -77,7 +77,7 @@ int main() {
7777
printf( "ltr = %u\n", x->ltr );
7878

7979
// Use the function interface to create an ndarray...
80-
struct stdlib_ndarray *x2 = stdlib_ndarray_constructor( buffer, 1, shape, strides, 0, order, dtype );
80+
struct ndarray *x2 = stdlib_ndarray_constructor( buffer, 1, shape, strides, 0, order, dtype );
8181
if ( x2 == NULL ) {
8282
printf( "Error allocating memory.\n" );
8383
exit( 1 );

lib/node_modules/@stdlib/ndarray/ctor/include/stdlib/ndarray.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
* #include "stdlib/ndarray_orders.h"
6363
* #include "stdlib/ndarray.h"
6464
*
65-
* struct stdlib_ndarray *x = malloc( sizeof( struct stdlib_ndarray ) );
65+
* struct ndarray *x = malloc( sizeof( struct ndarray ) );
6666
* if ( x == NULL ) {
6767
* printf( "Error allocating memory.\n" );
6868
* exit( 1 );
@@ -107,7 +107,7 @@
107107
* // Free allocated memory:
108108
* free( x );
109109
*/
110-
struct stdlib_ndarray {
110+
struct ndarray {
111111
// Underlying data type:
112112
enum STDLIB_NDARRAY_DTYPE dtype;
113113

@@ -151,6 +151,6 @@ struct stdlib_ndarray {
151151
/**
152152
* Returns a pointer to a dynamically allocated ndarray.
153153
*/
154-
struct stdlib_ndarray * stdlib_ndarray_constructor( uint8_t *data, uint64_t ndims, int64_t *shape, int64_t *strides, uint64_t offset, enum STDLIB_NDARRAY_ORDER order, enum STDLIB_NDARRAY_DTYPE dtype );
154+
struct ndarray * stdlib_ndarray_constructor( uint8_t *data, uint64_t ndims, int64_t *shape, int64_t *strides, uint64_t offset, enum STDLIB_NDARRAY_ORDER order, enum STDLIB_NDARRAY_DTYPE dtype );
155155

156156
#endif // !STDLIB_NDARRAY_H

lib/node_modules/@stdlib/ndarray/ctor/src/ndarray.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
* enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR;
7474
*
7575
* // Create an ndarray:
76-
* struct stdlib_ndarray *x = stdlib_ndarray_constructor( buffer, ndims, shape, strides, offset, order, dtype );
76+
* struct ndarray *x = stdlib_ndarray_constructor( buffer, ndims, shape, strides, offset, order, dtype );
7777
* if ( x == NULL ) {
7878
* printf( "Error allocating memory.\n" );
7979
* exit( 1 );
@@ -82,8 +82,8 @@
8282
* // Free allocated memory:
8383
* free( x );
8484
*/
85-
struct stdlib_ndarray * stdlib_ndarray_constructor( uint8_t *data, uint64_t ndims, int64_t *shape, int64_t *strides, uint64_t offset, enum STDLIB_NDARRAY_ORDER order, enum STDLIB_NDARRAY_DTYPE dtype ) {
86-
struct stdlib_ndarray *arr = malloc( sizeof( struct stdlib_ndarray ) );
85+
struct ndarray * stdlib_ndarray_constructor( uint8_t *data, uint64_t ndims, int64_t *shape, int64_t *strides, uint64_t offset, enum STDLIB_NDARRAY_ORDER order, enum STDLIB_NDARRAY_DTYPE dtype ) {
86+
struct ndarray *arr = malloc( sizeof( struct ndarray ) );
8787
if ( arr == NULL ) {
8888
return NULL;
8989
}

0 commit comments

Comments
 (0)