8000 Auto-generated commit · stdlib-js/ndarray-base-assign@d00f298 · GitHub
[go: up one dir, main page]

Skip to content

Commit d00f298

Browse files
committed
Auto-generated commit
1 parent 1880621 commit d00f298

File tree

22 files changed

+182
-178
lines changed

22 files changed

+182
-178
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-03-22)
7+
## Unreleased (2025-03-24)
88

99
<section class="features">
1010

@@ -35,6 +35,7 @@
3535

3636
<details>
3737

38+
- [`47f726c`](https://github.com/stdlib-js/stdlib/commit/47f726ce566a85f054035c662768653bae07d25a) - **chore:** resolve lint errors _(by Athan Reines)_
3839
- [`1e48327`](https://github.com/stdlib-js/stdlib/commit/1e48327f169d8cd8adf1177f92d5147077edbfe7) - **fix:** handle zero-dimensional ndarrays _(by Athan Reines)_
3940
- [`04f7752`](https://github.com/stdlib-js/stdlib/commit/04f77520acf685e9325bf4413be6da7543ed3cb5) - **refactor:** accommodate known array types for increased performance _(by Athan Reines)_
4041
- [`52f7ac2`](https://github.com/stdlib-js/stdlib/commit/52f7ac26eff82f57ccfca5a3b04c15dbacad074e) - **fix:** use correct stride _(by Athan Reines)_

CONTRIBUTORS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Contributors listed in alphabetical order.
44

55
Aadish Jain <jain.aadishj@gmail.com>
6+
Aarya Balwadkar <142713127+AaryaBalwadkar@users.noreply.github.com>
67
Aayush Khanna <aayushiitbhu23@gmail.com>
78
Abdelrahman Samir <60700731+abdelrahman04@users.noreply.github.com>
89
Abdul Kaium <97376242+impawstarlight@users.noreply.github.com>
@@ -77,6 +78,7 @@ Justyn Shelby <96994781+ShelbyJustyn@users.noreply.github.com>
7778
Karan Anand <119553199+anandkaranubc@users.noreply.github.com>
7879
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
7980
Kaushikgtm <162317291+Kaushikgtm@users.noreply.github.com>
81+
Kavyansh-Bagdi <153486713+Kavyansh-Bagdi@users.noreply.github.com>
8082
Kohantika Nath <145763549+kohantikanath@users.noreply.github.com>
8183
Krishnam Agarwal <83017176+888krishnam@users.noreply.github.com>
8284
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>
@@ -104,6 +106,7 @@ Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
104106
Oneday12323 <107678750+Oneday12323@users.noreply.github.com>
105107
Ori Miles <97595296+orimiles5@users.noreply.github.com>
106108
Philipp Burckhardt <pburckhardt@outlook.com>
109+
Prajjwal Bajpai <142303989+prajjwalbajpai@users.noreply.github.com>
107110
Prajwal Kulkarni <prajwalkulkarni76@gmail.com>
108111
Pranav Goswami <pranavchiku11@gmail.com>
109112
Pranjal Jha <97080887+PraneGIT@users.noreply.github.com>

include/stdlib/ndarray/base/assign/macros/10d.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
* STDLIB_NDARRAY_ASSIGN_10D_LOOP_EPILOGUE
4141
*/
4242
#define STDLIB_NDARRAY_ASSIGN_10D_LOOP_PREAMBLE \
43-
struct ndarray *x1 = arrays[ 0 ]; \
44-
struct ndarray *x2 = arrays[ 1 ]; \
45-
int64_t *shape = stdlib_ndarray_shape( x1 ); \
46-
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
47-
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
43+
const struct ndarray *x1 = arrays[ 0 ]; \
44+
const struct ndarray *x2 = arrays[ 1 ]; \
45+
const int64_t *shape = stdlib_ndarray_shape( x1 ); \
46+
const int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
47+
const int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
4848
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
4949
uint8_t *px2 = stdlib_ndarray_data( x2 ); \
5050
int64_t d0x1; \
@@ -185,13 +185,13 @@
185185
* STDLIB_NDARRAY_ASSIGN_10D_LOOP_EPILOGUE
186186
*/
187187
#define STDLIB_NDARRAY_ASSIGN_10D_LOOP_TWO_OUT_PREAMBLE \
188-
struct ndarray *x1 = arrays[ 0 ]; \
189-
struct ndarray *x2 = arrays[ 1 ]; \
190-
struct ndarray *x3 = arrays[ 2 ]; \
191-
int64_t *shape = stdlib_ndarray_shape( x1 ); \
192-
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
193-
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
194-
int64_t *sx3 = stdlib_ndarray_strides( x3 ); \
188+
const struct ndarray *x1 = arrays[ 0 ]; \
189+
const struct ndarray *x2 = arrays[ 1 ]; \
190+
const struct ndarray *x3 = arrays[ 2 ]; \
191+
const int64_t *shape = stdlib_ndarray_shape( x1 ); \
192+
const int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
193+
const int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
194+
const int64_t *sx3 = stdlib_ndarray_strides( x3 ); \
195195
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
196196
uint8_t *px2 = stdlib_ndarray_data( x2 ); \
197197
uint8_t *px3 = stdlib_ndarray_data( x3 ); \

include/stdlib/ndarray/base/assign/macros/10d_blocked.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
* STDLIB_NDARRAY_ASSIGN_10D_BLOCKED_LOOP_EPILOGUE
4646
*/
4747
#define STDLIB_NDARRAY_ASSIGN_10D_BLOCKED_LOOP_PREAMBLE \
48-
struct ndarray *x1 = arrays[ 0 ]; \
49-
struct ndarray *x2 = arrays[ 1 ]; \
48+
const struct ndarray *x1 = arrays[ 0 ]; \
49+
const struct ndarray *x2 = arrays[ 1 ]; \
5050
int64_t shape[10]; \
5151
int64_t sx1[10]; \
5252
int64_t sx2[10]; \
@@ -309,9 +309,9 @@
309309
* STDLIB_NDARRAY_ASSIGN_10D_BLOCKED_LOOP_EPILOGUE
310310
*/
311311
#define STDLIB_NDARRAY_ASSIGN_10D_BLOCKED_LOOP_TWO_OUT_PREAMBLE \
312-
struct ndarray *x1 = arrays[ 0 ]; \
313-
struct ndarray *x2 = arrays[ 1 ]; \
314-
struct ndarray *x3 = arrays[ 2 ]; \
312+
const struct ndarray *x1 = arrays[ 0 ]; \
313+
const struct ndarray *x2 = arrays[ 1 ]; \
314+
const struct ndarray *x3 = arrays[ 2 ]; \
315315
int64_t shape[10]; \
316316
int64_t sx1[10]; \
317317
int64_t sx2[10]; \

include/stdlib/ndarray/base/assign/macros/1d.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939
* STDLIB_NDARRAY_ASSIGN_1D_LOOP_EPILOGUE
4040
*/
4141
#define STDLIB_NDARRAY_ASSIGN_1D_LOOP_PREAMBLE \
42-
struct ndarray *x1 = arrays[ 0 ]; \
43-
struct ndarray *x2 = arrays[ 1 ]; \
44-
int64_t *shape = stdlib_ndarray_shape( x1 ); \
45-
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
46-
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
42+
const struct ndarray *x1 = arrays[ 0 ]; \
43+
const struct ndarray *x2 = arrays[ 1 ]; \
44+
const int64_t *shape = stdlib_ndarray_shape( x1 ); \
45+
const int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
46+
const int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
4747
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
4848
uint8_t *px2 = stdlib_ndarray_data( x2 ); \
4949
int64_t d0x1; \
@@ -77,13 +77,13 @@
7777
* STDLIB_NDARRAY_ASSIGN_1D_LOOP_EPILOGUE
7878
*/
7979
#define STDLIB_NDARRAY_ASSIGN_1D_LOOP_TWO_OUT_PREAMBLE \
80-
struct ndarray *x1 = arrays[ 0 ]; \
81-
struct ndarray *x2 = arrays[ 1 ]; \
82-
struct ndarray *x3 = arrays[ 2 ]; \
83-
int64_t *shape = stdlib_ndarray_shape( x1 ); \
84-
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
85-
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
86-
int64_t *sx3 = stdlib_ndarray_strides( x3 ); \
80+
const struct ndarray *x1 = arrays[ 0 ]; \
81+
const struct ndarray *x2 = arrays[ 1 ]; \
82+
const struct ndarray *x3 = arrays[ 2 ]; \
83+
const int64_t *shape = stdlib_ndarray_shape( x1 ); \
84+
const int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
85+
const int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
86+
const int64_t *sx3 = stdlib_ndarray_strides( x3 ); \
8787
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
8888
uint8_t *px2 = stdlib_ndarray_data( x2 ); \
8989
uint8_t *px3 = stdlib_ndarray_data( x3 ); \

include/stdlib/ndarray/base/assign/macros/2d.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
* STDLIB_NDARRAY_ASSIGN_2D_LOOP_EPILOGUE
4141
*/
4242
#define STDLIB_NDARRAY_ASSIGN_2D_LOOP_PREAMBLE \
43-
struct ndarray *x1 = arrays[ 0 ]; \
44-
struct ndarray *x2 = arrays[ 1 ]; \
45-
int64_t *shape = stdlib_ndarray_shape( x1 ); \
46-
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
47-
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
43+
const struct ndarray *x1 = arrays[ 0 ]; \
44+
const struct ndarray *x2 = arrays[ 1 ]; \
45+
const int64_t *shape = stdlib_ndarray_shape( x1 ); \
46+
const int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
47+
const int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
4848
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
4949
uint8_t *px2 = stdlib_ndarray_data( x2 ); \
5050
int64_t d0x1; \
@@ -97,13 +97,13 @@
9797
* STDLIB_NDARRAY_ASSIGN_2D_LOOP_EPILOGUE
9898
*/
9999
#define STDLIB_NDARRAY_ASSIGN_2D_LOOP_TWO_OUT_PREAMBLE \
100-
struct ndarray *x1 = arrays[ 0 ]; \
101-
struct ndarray *x2 = arrays[ 1 ]; \
102-
struct ndarray *x3 = arrays[ 2 ]; \
103-
int64_t *shape = stdlib_ndarray_shape( x1 ); \
104-
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
105-
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
106-
int64_t *sx3 = stdlib_ndarray_strides( x3 ); \
100+
const struct ndarray *x1 = arrays[ 0 ]; \
101+
const struct ndarray *x2 = arrays[ 1 ]; \
102+
const struct ndarray *x3 = arrays[ 2 ]; \
103+
const int64_t *shape = stdlib_ndarray_shape( x1 ); F438 \
104+
const int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
105+
const int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
106+
const int64_t *sx3 = stdlib_ndarray_strides( x3 ); \
107107
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
108108
uint8_t *px2 = stdlib_ndarray_data( x2 ); \
109109
uint8_t *px3 = stdlib_ndarray_data( x3 ); \

include/stdlib/ndarray/base/assign/macros/2d_blocked.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
* STDLIB_NDARRAY_ASSIGN_2D_BLOCKED_LOOP_EPILOGUE
4646
*/
4747
#define STDLIB_NDARRAY_ASSIGN_2D_BLOCKED_LOOP_PREAMBLE \
48-
struct ndarray *x1 = arrays[ 0 ]; \
49-
struct ndarray *x2 = arrays[ 1 ]; \
48+
const struct ndarray *x1 = arrays[ 0 ]; \
49+
const struct ndarray *x2 = arrays[ 1 ]; \
5050
int64_t shape[2]; \
5151
int64_t sx1[2]; \
5252
int64_t sx2[2]; \
@@ -149,9 +149,9 @@
149149
* STDLIB_NDARRAY_ASSIGN_2D_BLOCKED_LOOP_EPILOGUE
150150
*/
151151
#define STDLIB_NDARRAY_ASSIGN_2D_BLOCKED_LOOP_TWO_OUT_PREAMBLE \
152-
struct ndarray *x1 = arrays[ 0 ]; \
153-
struct ndarray *x2 = arrays[ 1 ]; \
154-
struct ndarray *x3 = arrays[ 2 ]; \
152+
const struct ndarray *x1 = arrays[ 0 ]; \
153+
const struct ndarray *x2 = arrays[ 1 ]; \
154+
const struct ndarray *x3 = arrays[ 2 ]; \
155155
int64_t shape[2]; \
156156
int64_t sx1[2]; \
157157
int64_t sx2[2]; \

include/stdlib/ndarray/base/assign/macros/3d.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
* STDLIB_NDARRAY_ASSIGN_3D_LOOP_EPILOGUE
4141
*/
4242
#define STDLIB_NDARRAY_ASSIGN_3D_LOOP_PREAMBLE \
43-
struct ndarray *x1 = arrays[ 0 ]; \
44-
struct ndarray *x2 = arrays[ 1 ]; \
45-
int64_t *shape = stdlib_ndarray_shape( x1 ); \
46-
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
47-
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
43+
const struct ndarray *x1 = arrays[ 0 ]; \
44+
const struct ndarray *x2 = arrays[ 1 ]; \
45+
const int64_t *shape = stdlib_ndarray_shape( x1 ); \
46+
const int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
47+
const int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
4848
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
4949
uint8_t *px2 = stdlib_ndarray_data( x2 ); \
5050
int64_t d0x1; \
@@ -108,13 +108,13 @@
108108
* STDLIB_NDARRAY_ASSIGN_3D_LOOP_EPILOGUE
109109
*/
110110
#define STDLIB_NDARRAY_ASSIGN_3D_LOOP_TWO_OUT_PREAMBLE \
111-
struct ndarray *x1 = arrays[ 0 ]; \
112-
struct ndarray *x2 = arrays[ 1 ]; \
113-
struct ndarray *x3 = arrays[ 2 ]; \
114-
int64_t *shape = stdlib_ndarray_shape( x1 ); \
115-
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
116-
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
117-
int64_t *sx3 = stdlib_ndarray_strides( x3 ); \
111+
const struct ndarray *x1 = arrays[ 0 ]; \
112+
const struct ndarray *x2 = arrays[ 1 ]; \
113+
const struct ndarray *x3 = arrays[ 2 ]; \
114+
const int64_t *shape = stdlib_ndarray_shape( x1 ); \
115+
const int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
116+
const int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
117+
const int64_t *sx3 = stdlib_ndarray_strides( x3 ); \
118118
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
119119
uint8_t *px2 = stdlib_ndarray_data( x2 ); \
120120
uint8_t *px3 = stdlib_ndarray_data( x3 ); \

include/stdlib/ndarray/base/assign/macros/3d_blocked.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
* STDLIB_NDARRAY_ASSIGN_3D_BLOCKED_LOOP_EPILOGUE
4646
*/
4747
#define STDLIB_NDARRAY_ASSIGN_3D_BLOCKED_LOOP_PREAMBLE \
48-
struct ndarray *x1 = arrays[ 0 ]; \
49-
struct ndarray *x2 = arrays[ 1 ]; \
48+
const struct ndarray *x1 = arrays[ 0 ]; \
49+
const struct ndarray *x2 = arrays[ 1 ]; \
5050
int64_t shape[3]; \
5151
int64_t sx1[3]; \
5252
int64_t sx2[3]; \
@@ -169,9 +169,9 @@
169169
* STDLIB_NDARRAY_ASSIGN_3D_BLOCKED_LOOP_EPILOGUE
170170
*/
171171
#define STDLIB_NDARRAY_ASSIGN_3D_BLOCKED_LOOP_TWO_OUT_PREAMBLE \
172-
struct ndarray *x1 = arrays[ 0 ]; \
173-
struct ndarray *x2 = arrays[ 1 ]; \
174-
struct ndarray *x3 = arrays[ 2 ]; \
172+
const struct ndarray *x1 = arrays[ 0 ]; \
173+
const struct ndarray *x2 = arrays[ 1 ]; \
174+
const struct ndarray *x3 = arrays[ 2 ]; \
175175
int64_t shape[3]; \
176176
int64_t sx1[3]; \
177177
int64_t sx2[3]; \

include/stdlib/ndarray/base/assign/macros/4d.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
* STDLIB_NDARRAY_ASSIGN_4D_LOOP_EPILOGUE
4141
*/
4242
#define STDLIB_NDARRAY_ASSIGN_4D_LOOP_PREAMBLE 6851 \
43-
struct ndarray *x1 = arrays[ 0 ]; \
44-
struct ndarray *x2 = arrays[ 1 ]; \
45-
int64_t *shape = stdlib_ndarray_shape( x1 ); \
46-
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
47-
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
43+
const struct ndarray *x1 = arrays[ 0 ]; \
44+
const struct ndarray *x2 = arrays[ 1 ]; \
45+
const int64_t *shape = stdlib_ndarray_shape( x1 ); \
46+
const int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
47+
const int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
4848
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
4949
uint8_t *px2 = stdlib_ndarray_data( x2 ); \
5050
int64_t d0x1; \
@@ -119,13 +119,13 @@
119119
* STDLIB_NDARRAY_ASSIGN_4D_LOOP_EPILOGUE
120120
*/
121121
#define STDLIB_NDARRAY_ASSIGN_4D_LOOP_TWO_OUT_PREAMBLE \
122-
struct ndarray *x1 = arrays[ 0 ]; \
123-
struct ndarray *x2 = arrays[ 1 ]; \
124-
struct ndarray *x3 = arrays[ 2 ]; \
125-
int64_t *shape = stdlib_ndarray_shape( x1 ); \
126-
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
127-
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
128-
int64_t *sx3 = stdlib_ndarray_strides( x3 ); \
122+
const struct ndarray *x1 = arrays[ 0 ]; \
123+
const struct ndarray *x2 = arrays[ 1 ]; \
124+
const struct ndarray *x3 = arrays[ 2 ]; \
125+
const int64_t *shape = stdlib_ndarray_shape( x1 ); \
126+
const int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
127+
const int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
128+
const int64_t *sx3 = stdlib_ndarray_strides( x3 ); \
129129
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
130130
uint8_t *px2 = stdlib_ndarray_data( x2 ); \
131131
uint8_t *px3 = stdlib_ndarray_data( x3 ); \

0 commit comments

Comments
 (0)
0