File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
numpy/_core/src/multiarray Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1570,8 +1570,8 @@ NpyIter_DebugPrint(NpyIter *iter)
1570
1570
printf ("VIRTUAL " );
1571
1571
if ((NIT_OPITFLAGS (iter )[iop ])& NPY_OP_ITFLAG_WRITEMASKED )
1572
1572
printf ("WRITEMASKED " );
1573
- if ((NIT_OPITFLAGS (iter )[iop ])& NPY_OP_ITFLAG_SINGLESTRIDE )
1574
- printf ("SINGLESTRIDE " );
1573
+ if ((NIT_OPITFLAGS (iter )[iop ])& NPY_OP_ITFLAG_BUF_SINGLESTRIDE )
1574
+ printf ("BUF_SINGLESTRIDE " );
1575
1575
printf ("\n" );
1576
1576
}
1577
1577
printf ("|\n" );
@@ -1950,7 +1950,7 @@ npyiter_fill_buffercopy_params(
1950
1950
/* copy setup is identical to non-reduced now. */
1951
1951
}
1952
1952
1953
- if (opitflags & NPY_OP_ITFLAG_SINGLESTRIDE ) {
1953
+ if (opitflags & NPY_OP_ITFLAG_BUF_SINGLESTRIDE ) {
1954
1954
/* Flatten the copy into a single stride. */
1955
1955
* ndim_transfer = 1 ;
1956
1956
* op_shape = op_transfersize ;
Original file line number Diff line number Diff line change @@ -2196,7 +2196,7 @@ npyiter_find_buffering_setup(NpyIter *iter)
2196
2196
* If it is not a single stride, we must buffer the operand.
2197
2197
*/
2198
2198
if (op_single_stride_dims [iop ] + is_reduce_op > best_dim ) {
2199
- NIT_OPITFLAGS (iter )[iop ] |= NPY_OP_ITFLAG_SINGLESTRIDE ;
2199
+ NIT_OPITFLAGS (iter )[iop ] |= NPY_OP_ITFLAG_BUF_SINGLESTRIDE ;
2200
2200
}
2201
2201
else {
2202
2202
op_is_buffered = 1 ;
@@ -2212,7 +2212,7 @@ npyiter_find_buffering_setup(NpyIter *iter)
2212
2212
* is 0.
2213
2213
*/
2214
2214
if (!is_reduce_op
2215
- && NIT_OPITFLAGS (iter )[iop ] & NPY_OP_ITFLAG_SINGLESTRIDE
2215
+ && NIT_OPITFLAGS (iter )[iop ] & NPY_OP_ITFLAG_BUF_SINGLESTRIDE
2216
2216
&& NAD_STRIDES (axisdata )[iop ] == 0 ) {
2217
2217
/* This op is always 0 strides, so even the buffer is that. */
2218
2218
inner_stride = 0 ;
@@ -2247,7 +2247,7 @@ npyiter_find_buffering_setup(NpyIter *iter)
2247
2247
" inner stride: %zd\n"
2248
2248
" reduce outer stride: %zd (if iterator uses reduce)\n" ,
2249
2249
iop , op_is_buffered , is_reduce_op ,
2250
- (NIT_OPITFLAGS (iter )[iop ] & NPY_OP_ITFLAG_SINGLESTRIDE ) != 0 ,
2250
+ (NIT_OPITFLAGS (iter )[iop ] & NPY_OP_ITFLAG_BUF_SINGLESTRIDE ) != 0 ,
2251
2251
inner_stride , reduce_outer_stride );
2252
2252
2253
2253
NBF_STRIDES (bufferdata )[iop ] = inner_stride ;
Original file line number Diff line number Diff line change 122
122
#define NPY_OP_ITFLAG_CAST 0x0004
123
123
/* The operand never needs buffering (implies BUF_SINGLESTRIDE) */
124
124
#define NPY_OP_ITFLAG_BUFNEVER 0x0008
125
+ /* Whether the buffer filling can use a single stride (minus reduce if reduce) */
126
+ #define NPY_OP_ITFLAG_BUF_SINGLESTRIDE 0x0010
125
127
/* The operand is being reduced */
126
128
#define NPY_OP_ITFLAG_REDUCE 0x0020
127
129
/* The operand is for temporary use, does not have a backing array */
137
139
#define NPY_OP_ITFLAG_FORCECOPY 0x0200
138
140
/* The operand has temporary data, write it back at dealloc */
139
141
#define NPY_OP_ITFLAG_HAS_WRITEBACK 0x0400
140
- /* Whether the buffer filling can use a single stride (minus reduce if reduce) */
141
- #define NPY_OP_ITFLAG_SINGLESTRIDE 0x0800
142
142
143
143
/*
144
144
* The data layout of the iterator is fully specified by
294E
You can’t perform that action at this time.
0 commit comments