 
 	// Allocate arrays on host memory
 	data_t *h_result = (float *) malloc(allocSize);
+
+	// Copying input matrix for pthread version
+	input_for_pthread = (data_t*) malloc(allocSize);
+	copy_matrix(input, input_for_pthread, len);
 
 	// GPU Timing variables
 	cudaEvent_t start, stop;

	cudaEventElapsedTime(&elapsed_gpu, start, stop);
	printf("\nCPU time: %f (msec)\n", elapsed_gpu);


	int errCount = 0, zeroCount = 0;
	float max_diff = 0;

#define TOL 1e-4

int main() {
	const char filename[] = "matrix/500.txt";

	//READING FROM FILE
	data_t * input;
	data_t * input_for_pthread;
	int len;
	read_matrix_from_file(&input, filename, & len);
	//END READING FROM FILE
