 __constant__ int c_ndata; // # of data points
 __constant__ int c_mfeat; // # of measured features per data point
 __constant__ int c_pchi; // # of characteristics per data point
+__constant__ int c_dim_cholfact; // # size of cholesky factor for characteristic proposal covariance
 __constant__ int c_dim_theta; // # dimension of population parameters
 
 // Function to compute the rank-1 Cholesky update/downdate. Note that this is done in place.

			double scaled_proposal_j = 0.0;
			for (int k=0; k<(j+1); k++) {
				// transform the unit proposal to the centered proposal, drawn from a multivariate normal.
				scaled_proposal_j += cholfact[c_ndata * cholfact_index + idata] * snorm_deviate[k];
				cholfact_index++;
			}
			proposed_chi[j] = chi[c_ndata * j + idata] + scaled_proposal_j;
			scaled_proposal[j] = scaled_proposal_j;
		}
		return proposed_chi;

			bool accept = Chi.AcceptProp(logpost_prop, logpost_current, 0.0, 0.0, metro_ratio);

			// adapt the covariance matrix of the characteristic proposal distribution
			Chi.AdaptProp(local_cholfact, snorm_deviate, scaled_proposal, metro_ratio);
			for (int j = 0; j < c_dim_cholfact; ++j) {
				// copy value of this adapted cholesky factor back to global memory
				cholfact[j * c_ndata + idata] = local_cholfact[j];
			}
			current_iter++;

			// copy local RNG state back to global memory
