fn
prod_axis_f32
void prod_axis_f32(const float * in, float * out, int outer, int reduce_dim, int inner)Reduces a single axis by multiplicative product into a packed (outer, inner) output.
Identity element is 1; an empty reduce dimension yields 1 per cell.
Uses the generic axis_reduce template — there is no vDSP equivalent.
Note that floating-point products are not associative, so the result is
deterministic only for a fixed loop order (the kernel iterates r from
0 to reduce_dim - 1).
Math
Parameters
inconst float*Source buffer of shape
(outer, reduce_dim, inner).outfloat*Destination buffer of shape
(outer, inner).outer, reduce_dim, innerstd::size_tLayout extents; see
sum_axis_f32.Notes
Overflow and underflow are unchecked. Callers that require log-sum-exp
style stability must compute the product in log space themselves.