update all callback functions except scalar-matrix product and matrix-scalar product.