 		fprintf(stderr, "cudaDeviceReset failed!");
 		return 1;
 	}
-
+	getchar();
 	return 0;
 }
 

	memset(E, 0.0, sizeof(float) * height_A * width_B);
	memset(F, 0.0, sizeof(float) * height_A * width_B);


	//
	srand((unsigned)time(0));

	// Launch a kernel on the GPU with one thread for each element.
	if (mode == Mode1)
	{
		cudaEvent_t start1, stop1;
		cudaEventCreate(&start1);
		cudaEventCreate(&stop1);
		cudaEventRecord(start1, 0);

		MatrixMulGPU_1 << <Blocks, Threads >> >(dev_c, dev_a, dev_b, WA, WB);


		cudaEventRecord(stop1, 0);
		cudaEventSynchronize(stop1);

		float elaspsedTime1;
		cudaEventElapsedTime(&elaspsedTime1, start1, stop1);
		printf("GPU time : %3.1fms \n", elaspsedTime1);
	}

	if (mode == Mode2)
	{
		cudaEvent_t start2, stop2;
		cudaEventCreate(&start2);
		cudaEventCreate(&stop2);
		cudaEventRecord(start2, 0);

		MatrixMulGPU_2<16> << <Blocks, Threads >> >(dev_c, dev_a, dev_b, WA, WB);

		cudaEventRecord(stop2, 0);
		cudaEventSynchronize(stop2);

		float elaspsedTime2;
		cudaEventElapsedTime(&elaspsedTime2, start2, stop2);
		printf("GPU with Shared Memory time : %3.1fms \n", elaspsedTime2);
	}

	// Check for any errors launching the kernel
