Expand description
Elementwise operations on slices.
Each function dispatches on the operation once, outside the loop, so that
the operation is inlined into the loop and the loop can be vectorized.
The results are the same as applying Ops element by element.
Functionsยง
- binary_
assign x[i] = op(x[i], y[i]), whereyof length 1 stands for every element (an elementwise operation written over its first operand).- binary_
into out[i] = op(x[i], y[i]), where a slice of length 1 stands for every element (a broadcast scalar).- compare_
into out[i] = op(x[i], y[i])for a comparison, where a slice of length 1 stands for every element.- unary_
assign x[i] = op(x[i])(an elementwise operation written over its operand).- unary_
into out[i] = op(x[i]).