add serial Rcpp implementation to innerProduct