 		cudaMalloc((void **)&d_V, m*n*sizeof(int));
 		cudaMalloc((void **)&d_out, m*k*sizeof(int));
 
+		cudaMalloc((void **)&D, m*m*sizeof(int));
+
 		for(i=0; i<m*n; i++)
 		{
 			fscanf(fp, "%d", &V[i]);

#include<stdio.h>
#include<cuda.h>
#include<stdlib.h>

#define INIT_MAX 100
void showResult(int m, int k, int *out);

/* 
* m: total num of points
* n: n dimensions

{ 
	int m,n,k;
	int i;
	int *V, *out;				//host copies
	int *d_V, *d_out;			//device copies
	
	int *D;						//will be replaced with shared memory

	FILE *fp;
	if(argc != 2)
	{
