 		cudaMalloc((void **)&d_V, m*n*sizeof(int));
 		cudaMalloc((void **)&d_out, m*k*sizeof(int));
 
-		cudaMalloc((void **)&D, m*m*sizeof(int));
+//		cudaMalloc((void **)&D, m*m*sizeof(int));
 
 		for(i=0; i<m*n; i++)
 		{

	D[i*m+j] = dist;
}

__global__ void knn(int m, int n, int k, int *V, int *out, int *D)
// __global__ void knn(int m, int n, int k, int *V, int *out)
{
	int i,j;
	int dim;

		
		cudaMemcpy(d_V, V, m*n*sizeof(int), cudaMemcpyHostToDevice);

		knn<<<m, m, m*m*sizeof(int)>>>(m, n, k, d_V, d_out);

		cudaMemcpy(out, d_out, m*k*sizeof(int), cudaMemcpyDeviceToHost);

