diff --git a/bucketSort.c b/bucketSort.c new file mode 100644 index 0000000000000000000000000000000000000000..4517139b0b88ba80096bb783644c22817640c6e4 --- /dev/null +++ b/bucketSort.c @@ -0,0 +1,10 @@ +#include <stdio.h> +#include <stdlib.h> +#include <omp.h> + +void bucketSort(); /* Thread Function */ + +int main(int argc, chra *argv[]) { + + return 0; +} diff --git a/omp_hello.c b/omp_hello.c new file mode 100644 index 0000000000000000000000000000000000000000..06ecdea9849c7a982a6ea54aa82a1f52465c31d9 --- /dev/null +++ b/omp_hello.c @@ -0,0 +1,22 @@ +#include <stdio.h> +#include <stdlib.h> +#include <omp.h> + +void Hello(void); /* Thread function */ + +int main(int argc, char *argv[]) { + int thread_count = strtol(argv[1], NULL, 10); + + #pragma omp parallel num_threads(thread_count) + Hello(); + return 0; +} + +void Hello(void) { + int my_rank = omp_get_thread_num(); + int thread_count = omp_get_num_threads(); + + printf("Hello from thread %d of %d\n", + my_rank, thread_count); +} +