 			cudaMalloc((void**)&dev_facets_nn_, sizeof(index_t) * facet_nb_ * 1);
 
 			//Output result.
-			//cudaMalloc((void**)&dev_ret_, sizeof(double) *  facet_nb_ * 10 * 40);
-			cudaMalloc((void**)&dev_ret_, sizeof(double) * points_nb_ * 4);
+			cudaMalloc((void**)&dev_ret_, sizeof(double) *  facet_nb_ * 10 * 40);
+			//cudaMalloc((void**)&dev_ret_, sizeof(double) * points_nb_ * 4);
 			CheckCUDAError("Allocating device memory");
 
 			//Copy

			current_polygon.vertex[0].x = v1.x; current_polygon.vertex[0].y = v1.y; current_polygon.vertex[0].z = v1.z; current_polygon.vertex[0].w = 1.0;
			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;
			//counter++;
		}
		// end debug
		/*

				retdata
				);
			
			//MyAtomicAdd(&retdata[tid], 1);
			//MyAtomicAdd(&retdata[320], 1);
			//store_info(tid, current_seed, current_polygon, &retdata[tid * 400 + counter * 40]);
			//Propagate to adjacent seeds
			for (index_t v = 0; v < current_polygon.vertex_nb; ++v)
