refactor AssignmentFunctors.h, unify with existing scalar_op
Reference issue
What does this implement/fix?
This cleans up the assignment functors, which contain a lot of redundant code (encountered on the other MR I'm working on). This has the side effect of making the behavior of compound assignments, e.g. a += b
, consistent with the simple assignment a = a + b
. One prominent example is that for vectorized integer division, we check for division by zero in scalar_quotient_op
, but not div_assign_op
.
Additional information
Edited by Charles Schlosser