share MCMC code between CPU and GPU