From eccf7bbb2836a97f14c169707480802b80fdd694 Mon Sep 17 00:00:00 2001 From: Brandon Rodriguez <brodriguez8774@gmail.com> Date: Sat, 24 Apr 2021 13:45:11 -0400 Subject: [PATCH] Cleanup main --- part_1/main.cu | 64 +------------------------------------------------- 1 file changed, 1 insertion(+), 63 deletions(-) diff --git a/part_1/main.cu b/part_1/main.cu index d14d0e0..6592689 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; -// } -- GitLab