 // Constants used for the model SED
 static __constant__ double c_nu0 = 2.3e11;  // reference frequency, nu0 = 230 GHz
 static const double nu0 = 2.3e11;
-static const int m = 5;  // the number of measured features per data point
+static const int mfeat = 5;  // the number of measured features per data point
 static __constant__ int c_m = 5;
     // observational frequencies, corresponding to the Herschel PACS and SPIRES bands
-static const double nu[m] = {4.286e12, 1.765e12, 1.200e12, 8.571e11, 6.000e11};
-static __constant__ double c_nu[m] = {4.286e12, 1.765e12, 1.200e12, 8.571e11, 6.000e11};
+static const double nu[mfeat] = {4.286e12, 1.765e12, 1.200e12, 8.571e11, 6.000e11};
+static __constant__ double c_nu[mfeat] = {4.286e12, 1.765e12, 1.200e12, 8.571e11, 6.000e11};
 static const double hplanck = 6.6260755e-27;  // Planck's constant, in cgs
 static const double clight = 2.997925e10;
 static const double kboltz = 1.380658e-16;

            double proposed_var_j = exp(proposed_theta[j + p]);
            // transform and reduction is over d_chi[j * n : (j+1) * n - 1]
            zsqr zsqrj(proposed_mu_j, proposed_var_j);
            logdens_pop = thrust::transform_reduce(chi_iter_begin, chi_iter_begin+n,
                                                zsqrj, logdens_pop, thrust::plus<double>());
            thrust::advance(chi_iter_begin, n);
        }

        double logdens_old = thrust::reduce(d_logdens.begin(), d_logdens.end());

        }

        // Compute the conditional log-posterior of the proposed parameter values for this data point
        double meas_i[mfeat];
        double meas_unc_i[mfeat];
        for (int k=0; k<c_m; k++) {
            // grab the measurements for this data point
            meas_i[k] = meas[n * k + i];
