File tree Expand file tree Collapse file tree 20 files changed +61
-61
lines changed
lib/node_modules/@stdlib/ndarray/base/nullary/include/stdlib/ndarray/base/nullary/macros Expand file tree Collapse file tree 20 files changed +61
-61
lines changed Original file line number Diff line number Diff line change 40
40
* STDLIB_NDARRAY_NULLARY_10D_LOOP_EPILOGUE
41
41
*/
42
42
#define STDLIB_NDARRAY_NULLARY_10D_LOOP_PREAMBLE \
43
- struct ndarray *x1 = arrays[ 0 ]; \
43
+ const struct ndarray *x1 = arrays[ 0 ]; \
44
44
int64_t *shape = stdlib_ndarray_shape( x1 ); \
45
45
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
46
46
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
151
151
* STDLIB_NDARRAY_NULLARY_10D_LOOP_EPILOGUE
152
152
*/
153
153
#define STDLIB_NDARRAY_NULLARY_10D_LOOP_TWO_OUT_PREAMBLE \
154
- struct ndarray *x1 = arrays[ 0 ]; \
155
- struct ndarray *x2 = arrays[ 1 ]; \
154
+ const struct ndarray *x1 = arrays[ 0 ]; \
155
+ const struct ndarray *x2 = arrays[ 1 ]; \
156
156
int64_t *shape = stdlib_ndarray_shape( x1 ); \
157
157
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
158
158
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
Original file line number Diff line number Diff line change 45
45
* STDLIB_NDARRAY_NULLARY_10D_BLOCKED_LOOP_EPILOGUE
46
46
*/
47
47
#define STDLIB_NDARRAY_NULLARY_10D_BLOCKED_LOOP_PREAMBLE \
48
- struct ndarray *x1 = arrays[ 0 ]; \
48
+ const struct ndarray *x1 = arrays[ 0 ]; \
49
49
int64_t shape[10]; \
50
50
int64_t sx1[10]; \
51
51
int64_t idx[10]; \
257
257
* STDLIB_NDARRAY_NULLARY_10D_BLOCKED_LOOP_EPILOGUE
258
258
*/
259
259
#define STDLIB_NDARRAY_NULLARY_10D_BLOCKED_LOOP_TWO_OUT_PREAMBLE \
260
- struct ndarray *x1 = arrays[ 0 ]; \
261
- struct ndarray *x2 = arrays[ 1 ]; \
260
+ const struct ndarray *x1 = arrays[ 0 ]; \
261
+ const struct ndarray *x2 = arrays[ 1 ]; \
262
262
int64_t shape[10]; \
263
263
int64_t sx1[10]; \
264
264
int64_t sx2[10]; \
Original file line number Diff line number Diff line change 39
39
* STDLIB_NDARRAY_NULLARY_1D_LOOP_EPILOGUE
40
40
*/
41
41
#define STDLIB_NDARRAY_NULLARY_1D_LOOP_PREAMBLE \
42
- struct ndarray *x1 = arrays[ 0 ]; \
42
+ const struct ndarray *x1 = arrays[ 0 ]; \
43
43
int64_t *shape = stdlib_ndarray_shape( x1 ); \
44
44
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
45
45
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
71
71
* STDLIB_NDARRAY_NULLARY_1D_LOOP_EPILOGUE
72
72
*/
73
73
#define STDLIB_NDARRAY_NULLARY_1D_LOOP_TWO_OUT_PREAMBLE \
74
- struct ndarray *x1 = arrays[ 0 ]; \
75
- struct ndarray *x2 = arrays[ 1 ]; \
74
+ const struct ndarray *x1 = arrays[ 0 ]; \
75
+ const struct ndarray *x2 = arrays[ 1 ]; \
76
76
int64_t *shape = stdlib_ndarray_shape( x1 ); \
77
77
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
78
78
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
199
199
* STDLIB_NDARRAY_NULLARY_1D_VIA_STRIDED( stdlib_strided_b )
200
200
*/
201
201
#define STDLIB_NDARRAY_NULLARY_1D_VIA_STRIDED ( strided_array_fcn ) \
202
- struct ndarray *x1 = arrays[ 0 ]; \
202
+ const struct ndarray *x1 = arrays[ 0 ]; \
203
203
int64_t shape[] = { \
204
204
stdlib_ndarray_dimension( x1, 0 ) \
205
205
}; \
Original file line number Diff line number Diff line change 40
40
* STDLIB_NDARRAY_NULLARY_2D_LOOP_EPILOGUE
41
41
*/
42
42
#define STDLIB_NDARRAY_NULLARY_2D_LOOP_PREAMBLE \
43
- struct ndarray *x1 = arrays[ 0 ]; \
43
+ const struct ndarray *x1 = arrays[ 0 ]; \
44
44
int64_t *shape = stdlib_ndarray_shape( x1 ); \
45
45
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
46
46
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
87
87
* STDLIB_NDARRAY_NULLARY_2D_LOOP_EPILOGUE
88
88
*/
89
89
#define STDLIB_NDARRAY_NULLARY_2D_LOOP_TWO_OUT_PREAMBLE \
90
- struct ndarray *x1 = arrays[ 0 ]; \
91
- struct ndarray *x2 = arrays[ 1 ]; \
90
+ const struct ndarray *x1 = arrays[ 0 ]; \
91
+ const struct ndarray *x2 = arrays[ 1 ]; \
92
92
int64_t *shape = stdlib_ndarray_shape( x1 ); \
93
93
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
94
94
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
Original file line number Diff line number Diff line change 45
45
* STDLIB_NDARRAY_NULLARY_2D_BLOCKED_LOOP_EPILOGUE
46
46
*/
47
47
#define STDLIB_NDARRAY_NULLARY_2D_BLOCKED_LOOP_PREAMBLE \
48
- struct ndarray *x1 = arrays[ 0 ]; \
48
+ const struct ndarray *x1 = arrays[ 0 ]; \
49
49
int64_t shape[2]; \
50
50
int64_t sx1[2]; \
51
51
int64_t idx[2]; \
129
129
* STDLIB_NDARRAY_NULLARY_2D_BLOCKED_LOOP_EPILOGUE
130
130
*/
131
131
#define STDLIB_NDARRAY_NULLARY_2D_BLOCKED_LOOP_TWO_OUT_PREAMBLE \
132
- struct ndarray *x1 = arrays[ 0 ]; \
133
- struct ndarray *x2 = arrays[ 1 ]; \
132
+ const struct ndarray *x1 = arrays[ 0 ]; \
133
+ const struct ndarray *x2 = arrays[ 1 ]; \
134
134
int64_t shape[2]; \
135
135
int64_t sx1[2]; \
136
136
int64_t sx2[2]; \
Original file line number Diff line number Diff line change 40
40
* STDLIB_NDARRAY_NULLARY_3D_LOOP_EPILOGUE
41
41
*/
42
42
#define STDLIB_NDARRAY_NULLARY_3D_LOOP_PREAMBLE \
43
- struct ndarray *x1 = arrays[ 0 ]; \
43
+ const struct ndarray *x1 = arrays[ 0 ]; \
44
44
int64_t *shape = stdlib_ndarray_shape( x1 ); \
45
45
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
46
46
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
95
95
* STDLIB_NDARRAY_NULLARY_3D_LOOP_EPILOGUE
96
96
*/
97
97
#define STDLIB_NDARRAY_NULLARY_3D_LOOP_TWO_OUT_PREAMBLE \
98
- struct ndarray *x1 = arrays[ 0 ]; \
99
- struct ndarray *x2 = arrays[ 1 ]; \
98
+ const struct ndarray *x1 = arrays[ 0 ]; \
99
+ const struct ndarray *x2 = arrays[ 1 ]; \
100
100
int64_t *shape = stdlib_ndarray_shape( x1 ); \
101
101
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
102
102
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
Original file line number Diff line number Diff line change 45
45
* STDLIB_NDARRAY_NULLARY_3D_BLOCKED_LOOP_EPILOGUE
46
46
*/
47
47
#define STDLIB_NDARRAY_NULLARY_3D_BLOCKED_LOOP_PREAMBLE \
48
- struct ndarray *x1 = arrays[ 0 ]; \
48
+ const struct ndarray *x1 = arrays[ 0 ]; \
49
49
int64_t shape[3]; \
50
50
int64_t sx1[3]; \
51
51
int64_t idx[3]; \
145
145
* STDLIB_NDARRAY_NULLARY_3D_BLOCKED_LOOP_EPILOGUE
146
146
*/
147
147
#define STDLIB_NDARRAY_NULLARY_3D_BLOCKED_LOOP_TWO_OUT_PREAMBLE \
148
- struct ndarray *x1 = arrays[ 0 ]; \
149
- struct ndarray *x2 = arrays[ 1 ]; \
148
+ const struct ndarray *x1 = arrays[ 0 ]; \
149
+ const struct ndarray *x2 = arrays[ 1 ]; \
150
150
int64_t shape[3]; \
151
151
int64_t sx1[3]; \
152
152
int64_t sx2[3]; \
Original file line number Diff line number Diff line change 40
40
* STDLIB_NDARRAY_NULLARY_4D_LOOP_EPILOGUE
41
41
*/
42
42
#define STDLIB_NDARRAY_NULLARY_4D_LOOP_PREAMBLE \
43
- struct ndarray *x1 = arrays[ 0 ]; \
43
+ const struct ndarray *x1 = arrays[ 0 ]; \
44
44
int64_t *shape = stdlib_ndarray_shape( x1 ); \
45
45
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
46
46
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
103
103
* STDLIB_NDARRAY_NULLARY_4D_LOOP_EPILOGUE
104
104
*/
105
105
#define STDLIB_NDARRAY_NULLARY_4D_LOOP_TWO_OUT_PREAMBLE \
106
- struct ndarray *x1 = arrays[ 0 ]; \
107
- struct ndarray *x2 = arrays[ 1 ]; \
106
+ const struct ndarray *x1 = arrays[ 0 ]; \
107
+ const struct ndarray *x2 = arrays[ 1 ]; \
108
108
int64_t *shape = stdlib_ndarray_shape( x1 ); \
109
109
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
110
110
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
Original file line number Diff line number Diff line change 45
45
* STDLIB_NDARRAY_NULLARY_4D_BLOCKED_LOOP_EPILOGUE
46
46
*/
47
47
#define STDLIB_NDARRAY_NULLARY_4D_BLOCKED_LOOP_PREAMBLE \
48
- struct ndarray *x1 = arrays[ 0 ]; \
48
+ const struct ndarray *x1 = arrays[ 0 ]; \
49
49
int64_t shape[4]; \
50
50
int64_t sx1[4]; \
51
51
int64_t idx[4]; \
161
161
* STDLIB_NDARRAY_NULLARY_4D_BLOCKED_LOOP_EPILOGUE
162
162
*/
163
163
#define STDLIB_NDARRAY_NULLARY_4D_BLOCKED_LOOP_TWO_OUT_PREAMBLE \
164
- struct ndarray *x1 = arrays[ 0 ]; \
165
- struct ndarray *x2 = arrays[ 1 ]; \
164
+ const struct ndarray *x1 = arrays[ 0 ]; \
165
+ const struct ndarray *x2 = arrays[ 1 ]; \
166
166
int64_t shape[4]; \
167
167
int64_t sx1[4]; \
168
168
int64_t sx2[4]; \
Original file line number Diff line number Diff line change 40
40
* STDLIB_NDARRAY_NULLARY_5D_LOOP_EPILOGUE
41
41
*/
42
42
#define STDLIB_NDARRAY_NULLARY_5D_LOOP_PREAMBLE \
43
- struct ndarray *x1 = arrays[ 0 ]; \
43
+ const struct ndarray *x1 = arrays[ 0 ]; \
44
44
int64_t *shape = stdlib_ndarray_shape( x1 ); \
45
45
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
46
46
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
111
111
* STDLIB_NDARRAY_NULLARY_5D_LOOP_EPILOGUE
112
112
*/
113
113
#define STDLIB_NDARRAY_NULLARY_5D_LOOP_TWO_OUT_PREAMBLE \
114
- struct ndarray *x1 = arrays[ 0 ]; \
115
- struct ndarray *x2 = arrays[ 1 ]; \
114
+ const struct ndarray *x1 = arrays[ 0 ]; \
115
+ const struct ndarray *x2 = arrays[ 1 ]; \
116
116
int64_t *shape = stdlib_ndarray_shape( x1 ); \
117
117
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
118
118
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
Original file line number Diff line number Diff line change 45
45
* STDLIB_NDARRAY_NULLARY_5D_BLOCKED_LOOP_EPILOGUE
46
46
*/
47
47
#define STDLIB_NDARRAY_NULLARY_5D_BLOCKED_LOOP_PREAMBLE \
48
- struct ndarray *x1 = arrays[ 0 ]; \
48
+ const struct ndarray *x1 = arrays[ 0 ]; \
49
49
int64_t shape[5]; \
50
50
int64_t sx1[5]; \
51
51
int64_t idx[5]; \
177
177
* STDLIB_NDARRAY_NULLARY_5D_BLOCKED_LOOP_EPILOGUE
178
178
*/
179
179
#define STDLIB_NDARRAY_NULLARY_5D_BLOCKED_LOOP_TWO_OUT_PREAMBLE \
180
- struct ndarray *x1 = arrays[ 0 ]; \
181
- struct ndarray *x2 = arrays[ 1 ]; \
180
+ const struct ndarray *x1 = arrays[ 0 ]; \
181
+ const struct ndarray *x2 = arrays[ 1 ]; \
182
182
int64_t shape[5]; \
183
183
int64_t sx1[5]; \
184
184
int64_t sx2[5]; \
Original file line number Diff line number Diff line change 40
40
* STDLIB_NDARRAY_NULLARY_6D_LOOP_EPILOGUE
41
41
*/
42
42
#define STDLIB_NDARRAY_NULLARY_6D_LOOP_PREAMBLE \
43
- struct ndarray *x1 = arrays[ 0 ]; \
43
+ const struct ndarray *x1 = arrays[ 0 ]; \
44
44
int64_t *shape = stdlib_ndarray_shape( x1 ); \
45
45
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
46
46
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
119
119
* STDLIB_NDARRAY_NULLARY_6D_LOOP_EPILOGUE
120
120
*/
121
121
#define STDLIB_NDARRAY_NULLARY_6D_LOOP_TWO_OUT_PREAMBLE \
122
- struct ndarray *x1 = arrays[ 0 ]; \
123
- struct ndarray *x2 = arrays[ 1 ]; \
122
+ const struct ndarray *x1 = arrays[ 0 ]; \
123
+ const struct ndarray *x2 = arrays[ 1 ]; \
124
124
int64_t *shape = stdlib_ndarray_shape( x1 ); \
125
125
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
126
126
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
Original file line number Diff line number Diff line change 45
45
* STDLIB_NDARRAY_NULLARY_6D_BLOCKED_LOOP_EPILOGUE
46
46
*/
47
47
#define STDLIB_NDARRAY_NULLARY_6D_BLOCKED_LOOP_PREAMBLE \
48
- struct ndarray *x1 = arrays[ 0 ]; \
48
+ const struct ndarray *x1 = arrays[ 0 ]; \
49
49
int64_t shape[6]; \
50
50
int64_t sx1[6]; \
51
51
int64_t idx[6]; \
193
193
* STDLIB_NDARRAY_NULLARY_6D_BLOCKED_LOOP_EPILOGUE
194
194
*/
195
195
#define STDLIB_NDARRAY_NULLARY_6D_BLOCKED_LOOP_TWO_OUT_PREAMBLE \
196
- struct ndarray *x1 = arrays[ 0 ]; \
197
- struct ndarray *x2 = arrays[ 1 ]; \
196
+ const struct ndarray *x1 = arrays[ 0 ]; \
197
+ const struct ndarray *x2 = arrays[ 1 ]; \
198
198
int64_t shape[6]; \
199
199
int64_t sx1[6]; \
200
200
int64_t sx2[6]; \
Original file line number Diff line number Diff line change 40
40
* STDLIB_NDARRAY_NULLARY_7D_LOOP_EPILOGUE
41
41
*/
42
42
#define STDLIB_NDARRAY_NULLARY_7D_LOOP_PREAMBLE \
43
- struct ndarray *x1 = arrays[ 0 ]; \
43
+ const struct ndarray *x1 = arrays[ 0 ]; \
44
44
int64_t *shape = stdlib_ndarray_shape( x1 ); \
45
45
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
46
46
uint8_t *px1 = stdlib_ndarray_data( x1 ); \
127
127
* STDLIB_NDARRAY_NULLARY_7D_LOOP_EPILOGUE
128
128
*/
129
129
#define STDLIB_NDARRAY_NULLARY_7D_LOOP_TWO_OUT_PREAMBLE \
130
- struct ndarray *x1 = arrays[ 0 ]; \
131
- struct ndarray *x2 = arrays[ 1 ]; \
130
+ const struct ndarray *x1 = arrays[ 0 ]; \
131
+ const struct ndarray *x2 = arrays[ 1 ]; \
132
132
int64_t *shape = stdlib_ndarray_shape( x1 ); \
133
133
int64_t *sx1 = stdlib_ndarray_strides( x1 ); \
134
134
int64_t *sx2 = stdlib_ndarray_strides( x2 ); \
Original file line number Diff line number Diff line change 45
45
* STDLIB_NDARRAY_NULLARY_7D_BLOCKED_LOOP_EPILOGUE
46
46
*/
47
47
#define STDLIB_NDARRAY_NULLARY_7D_BLOCKED_LOOP_PREAMBLE \
48
- struct ndarray *x1 = arrays[ 0 ]; \
48
+ const struct ndarray *x1 = arrays[ 0 ]; \
49
49
int64_t shape[7]; \
50
50
int64_t sx1[7]; \
51
51
int64_t idx[7]; \
209
209
* STDLIB_NDARRAY_NULLARY_7D_BLOCKED_LOOP_EPILOGUE
210
210
*/
211
211
#define STDLIB_NDARRAY_NULLARY_7D_BLOCKED_LOOP_TWO_OUT_PREAMBLE \
212
- struct ndarray *x1 = arrays[ 0 ]; \
213
- struct ndarray *x2 = arrays[ 1 ]; \
212
+ const struct ndarray *x1 = arrays[ 0 ]; \
213
+ const struct ndarray *x2 = arrays[ 1 ]; \
214
214
int64_t shape[7]; \
215
215
int64_t sx1[7]; \
216
216
int64_t sx2[7]; \
You can’t perform that action at this time.
0 commit comments