 		h_theta = theta;
 		d_theta = h_theta;
 	}
-	hvector GetTheta() {
-		return h_theta;
-	}
+	hvector GetHostTheta() {return h_theta;}
+	dvector GetDevTheta() {return d_theta;}
+	double* GetDevThetaPtr() {thrust::raw_pointer_cast(&d_theta[0])}
+
+
 
 protected:
 	// the value of the population parameter


	// kernel to update the values of the characteristics in parallel on the GPU
	template <class ChiType> __global__
	virtual void UpdateKernel(double* meas, double* meas_unc, double* chi, double* cholfact,
			double* logdens_meas, double* logdens_pop, curandState* devStates, int current_iter, int* naccept)
	{
		// TODO: place ndata, pchi, mfeat, target_rate, and decay_rate into constant memory


	}


	// adapt the covariance matrix of the proposals for the characteristics
	__device__ __host__ virtual void AdaptProp(double* cholfact, double* snorm_deviate, double* scaled_proposal,
			double metro_ratio)
	{
		double unit_norm = 0.0;
		for (int j=0; j<c_pchi; j++) {
			unit_norm += snorm_deviate[j] * snorm_deviate[j];
		}
		unit_norm = sqrt(unit_norm);
		double decay_sequence = 1.0 / pow((double) current_iter, c_decay_rate);
		double scaled_coef = sqrt(decay_sequence * fabs(metro_ratio - c_target_rate)) / unit_norm;
		for (int j=0; j<c_pchi; j++) {
			scaled_proposal[j] *= scaled_coef;
		}
		bool downdate = (metro_ratio < c_target_rate);
		// do rank-1 cholesky update to update the proposal covariance matrix
		CholUpdateR1(cholfact, scaled_proposal, c_pchi, downdate);
	}

	// decide whether to accept or reject the proposal based on the metropolist-hasting ratio
