 	double* dev_seedsInformation;
 	int* dev_seedsPolygonNumber;
 	double* ret_seeds;
+	double* test_seeds;
 
 	int *dev_facet_center_neighbors, *dev_seeds_neighbors;
 

void compute_RVD_with_knn(double* seeds_pointer, int seeds_nb,
double* mesh_vertex, int mesh_vertex_nb,
int* mesh_facet, int mesh_facet_nb,
int* facet_center_neighbor_index, int* seeds_neighbor_index, int k, double* ret_seeds)
{
	int tid = blockIdx.x * blockDim.x + threadIdx.x;
	if (tid >= mesh_facet_nb) return;

	int blocks = mesh_facet_nb / threads + ((mesh_facet_nb % threads) ? 1 : 0);

	compute_RVD_with_knn << <threads, blocks >> >(dev_seeds_pointer, points_nb, dev_mesh_vertex_pointer, mesh_vertex_nb, dev_mesh_facet_index, mesh_facet_nb, dev_facet_center_neighbors,
		dev_seeds_neighbors, 10, ret_seeds, test_seeds);

	CheckCUDAError("kenerl function");
	
	cudaMemcpy(host_seedsInfo, test_seeds, sizeof(double) * points_nb * 4, cudaMemcpyDeviceToHost);

	CheckCUDAError("pass data back to CPU");

	/*for (int i = 0; i < points_nb; ++i)
	{
		if (host_seedsInfo[i * 4 + 3] != 0){
			host_seedsInfo[i * 4 + 0] /= host_seedsInfo[i * 4 + 3];
			host_seedsInfo[i * 4 + 1] /= host_seedsInfo[i * 4 + 3];
			host_seedsInfo[i * 4 + 2] /= host_seedsInfo[i * 4 + 3];
		}
	}*/
	std::ofstream fileout("2.txt");
	for (int i = 0; i < points_nb; ++i)
	{
		//printf("Line %d : x : %.17lf, y : %.17lf, z : %.17lf, w : %.17lf\n", i, host_seedsInfo[i * 4 + 0], host_seedsInfo[i * 4 + 1], host_seedsInfo[i * 4 + 2], host_seedsInfo[i * 4 + 3]);
