openMP conditional pragma “if else”
I have a for loop that can be executed using schedule(static) or schedule(dynamic, 10) depending on a condition. Currently, My code is not DRY (Don't repeat yourself) enough and to accommodate the previous functionality it has the following repetition: boolean isDynamic; //can be true or false if(isDynamic){ #pragma omp parallel for num_threads(thread_count) default(shared) private(...) schedule(dynamic, 10) for(...){ //for code inside } }else{ #pragma omp parallel for num_threads(thread_count) default(shared) private(...) schedule(static) for(...){ //SAME for code inside, in fact, this is the