diff --git a/part_1/main.cu b/part_1/main.cu index d14d0e0a231809cee7706567eaa332819e6aefd5..659268956125c116f46b8b6e2a8526e1b9eb9094 100644 --- a/part_1/main.cu +++ b/part_1/main.cu @@ -1,5 +1,5 @@ /** - * + * Program entrypoint and intiialization. */ @@ -31,9 +31,6 @@ // Method Declaration. void process_dir(std::string path_str); void process_file(std::string path_str); -// void validate_path(char* path_str); -// void compute(int a, int b); -// __global__ void cuda_add(int a, int b, int* c); // Global Variables. @@ -180,62 +177,3 @@ void process_file(std::string path_str) { minute_format_string << std::setprecision(0) << std::fixed << minutes_elapsed; logger.timer(minute_format_string.str() + " min, " + second_format_string.str() + " seconds"); } - - -// /* -// * Program's main. Initializes and runs program. -// */ -// int main(int argc, char* argv[]) { -// printf("Starting program.\n"); -// printf("\n"); - -// // Check provided number of args. -// if (argc < 3) { -// // Less than two args provided. -// printf("Provided too few program args. Expected two integers to add."); -// } else if (argc > 3) { -// // More than two args provided. -// printf("Provided too many program args. Expected two integers to add."); -// } else { -// // Two args provided. Compute with GPU. -// int a = atoi(argv[1]); -// int b = atoi(argv[2]); -// printf("Adding %i and %i\n", a, b); -// compute(a, b); -// } - -// printf("\n"); -// printf("Terminating program.\n"); -// exit(0); -// } - - -// /* -// * Function to have CPU and GPU collaborate for basic addition computation. -// */ -// void compute(int a, int b) { -// int sum; -// int* dev_sum; - -// // Allocate memory on the GPU. -// cudaMalloc((int**) &dev_sum, sizeof(int)); - -// // Call CUDA function. -// cuda_add<<<1,1>>>(a, b, dev_sum); - -// // Copy GPU result back to CPU. -// cudaMemcpy(&sum, dev_sum, sizeof(int), cudaMemcpyDeviceToHost); - -// // Display result. -// printf("Sum is %i\n", sum); - -// cudaFree(dev_sum); -// } - - -// /** -// * Entrypoint to GPU kernel execution. -// */ -// __global__ void cuda_add(int a, int b, int* c) { -// *c = a + b; -// }