 			dev_points_, points_nb_,
 			dev_facets_, facet_nb_,
 			dev_points_nn_, k_,
-			dev_facets_nn_, 1,
+			dev_facets_nn_, dimension_,
 			dev_ret
 			);
 		CheckCUDAError("kernel function");
+		copy_back();
+		watcher.stop();
 		watcher.synchronize();
+		watcher.print_elaspsed_time(std::cout);
+		
+		std::string out_file("..//out//retdata.txt");
+		print_return_data(out_file);
 		free_memory();
-		watcher.print_elaspsed_time(std::cout);
 	}
 
 	__host__
 	void CudaRestrictedVoronoiDiagram::allocate_and_copy(DeviceMemoryMode mode){
+
+		host_ret = (double*)malloc(sizeof(double) * points_nb_ * 4);
 		switch (mode)
 		{
 		case GLOBAL_MEMORY:

	{
	}

	CudaRestrictedVoronoiDiagram::~CudaRestrictedVoronoiDiagram()
	{
	}

	__global__
		void kernel(
		double*			vertex,		index_t			vertex_nb,
		double*			points,		index_t			points_nb,
		index_t*		facets,		index_t			facets_nb,
		index_t*		points_nn,	index_t			k_p,
		index_t*		facets_nn,	index_t			k_f,
		double*			retdata
		){

	}

	__host__

		watcher.start();

		allocate_and_copy(GLOBAL_MEMORY);
		//might be improved dim3 type.
		int threads = 512;
		int blocks = facet_nb_ / threads + ((facet_nb_ % threads) ? 1 : 0);
		kernel << < threads, blocks >> > (
