 
 namespace Gpu_Rvd{
 
-	CudaRestrictedVoronoiDiagram::CudaRestrictedVoronoiDiagram(Mesh m, Points p, int iter, int k){
-		vertex_ = m.v_ptr();
-		vertex_nb_ = m.get_vertex_nb();
-		points_ = p.v_ptr();
-		points_nb_ = p.get_vertex_nb();
-		facets_ = m.f_ptr();
-		facet_nb_ = m.get_facet_nb();
+	CudaRestrictedVoronoiDiagram::CudaRestrictedVoronoiDiagram(Mesh* m, Points* p, int iter, int k){
+		vertex_ = m->v_ptr();
+		vertex_nb_ = m->get_vertex_nb();
+		points_ = p->v_ptr();
+		points_nb_ = p->get_vertex_nb();
+		facets_ = m->f_ptr();
+		facet_nb_ = m->get_facet_nb();
 		
 		k_ = k;
 		points_nn_ = (index_t*)malloc(sizeof(index_t) * k_ * points_nb_);
 		facets_nn_ = (index_t*)malloc(sizeof(index_t) * facet_nb_);
-		dimension_ = m.dimension();
+		dimension_ = m->dimension();
 
 		dev_vertex_ = nil;
 		dev_points_ = nil;

		if (is_store_){
			std::string name = "RVD_" + String::to_string(store_filename_counter_) + ".eobj";
			points_save(name, *x_);
		}
	}

	__host__

		double*			retdata
		){
		index_t tid = blockIdx.x * blockDim.x + threadIdx.x;

		int cur = tid;
		while (cur < points_nb * 4){
			g_seeds_information[tid] = 0;
			cur += facets_nb;
		}
		if (tid >= facets_nb) return;

		//load \memory[facet] 3 times.
		int3 facet_index = {
