* Removes the (additive) NPY_ITER_REDUCTION_AXIS indication and sets * is_forced_broadcast to 1 if it is set. Otherwise to 0. * * @param axis The op_axes[i] to normalize. * @param reduction_axis Output 1 if a reduction axis, otherwise 0. * @returns The normalized axis (without reduce axis flag). */
| 1465 | * @returns The normalized axis (without reduce axis flag). |
| 1466 | */ |
| 1467 | static inline int |
| 1468 | npyiter_get_op_axis(int axis, npy_bool *reduction_axis) { |
| 1469 | npy_bool forced_broadcast = axis >= NPY_ITER_REDUCTION_AXIS(-1); |
| 1470 | |
| 1471 | if (reduction_axis != NULL) { |
| 1472 | *reduction_axis = forced_broadcast; |
| 1473 | } |
| 1474 | if (forced_broadcast) { |
| 1475 | return axis - NPY_ITER_REDUCTION_AXIS(0); |
| 1476 | } |
| 1477 | return axis; |
| 1478 | } |
| 1479 | |
| 1480 | /* |
| 1481 | * Fills in the AXISDATA for the 'nop' operands, broadcasting |
no outgoing calls
no test coverage detected