RcppArmadillo for matrixMultiplyGrad