pub fn binary_op<F32Op, F64Op>(
lhs: HostTensor,
rhs: HostTensor,
f32_op: F32Op,
f64_op: F64Op,
simd_hint: Option<BinaryOp>,
) -> HostTensorExpand description
Apply a binary operation element-wise to two tensors.
Requires tensors to have the same shape. Uses SIMD acceleration for f32 when available and both tensors are contiguous.
Pass simd_hint to enable direct SIMD dispatch for standard ops (add/sub/mul/div).
Pass None for custom operations that have no SIMD fast path.