 		current_polygon.vertex[1].x = v2.x; current_polygon.vertex[1].y = v2.y; current_polygon.vertex[1].z = v2.z; current_polygon.vertex[1].w = 1.0;
 		current_polygon.vertex[2].x = v3.x; current_polygon.vertex[2].y = v3.y; current_polygon.vertex[2].z = v3.z; current_polygon.vertex[2].w = 1.0;
 
-		/*index_t current_seed = facets_nn[pid + tid * k_f];
-		intersection_clip_facet_SR(
-			current_polygon,
-			current_seed,
-			points,
-			points_nb,
-			points_nn,
-			k_p
-			);
-		action(
-			current_polygon,
-			current_seed,
-			retdata
-			); return;*/
+		
 		
 		CudaPolygon current_store = current_polygon;
 		//doesn't have the stack?

		knn_->search(points_nn_);*/

		//result_print("points_nn.txt", points_nn_, k_ * points_nb_, k_);
		//result_print("facets_nn.txt", facets_nn_, fk_ * facet_nb_, fk_);
	}

	void CudaRestrictedVoronoiDiagram::update_neighbors(){

				CheckCUDAError("kernel function");
				
				copy_back();
				//debug
				//int c   = host_ret_[0];
				//std::ifstream in("C:\\Users\\JWhan\\Desktop\\DATA\\visited_nb.txt");
				//int* temp = (int*)malloc(sizeof(int) * facet_nb_);
				//for (index_t t = 0; t < facet_nb_; ++t){
				//	in >> temp[t];
				//	//std::cout << temp[t];
				//	if ((index_t)host_ret_[t] != (index_t)temp[t]){
				//		std::cout << "Mismatch in facet " << t << " !"
				//			<< "my number = " << host_ret_[t]
				//			<< "  correct number = "
				//			<< temp[t] << std::endl;
				//	}
				//}
				
				//end debug
				result_print("retdata.txt", host_ret_, points_nb_ * 4, 4);
				//is_store_ = false;
				update_points();
				iter_watcher.stop();
				iter_watcher.synchronize();
