Answer the question
In order to leave comments, you need to log in
How to guarantee the execution of two threads on two cores?
In the program using the directives
#pragma omp parallel sections
#pragma omp section
....
#pragma omp section
.....
I manually divide the program into two threads. How to guarantee the execution of two threads on two cores? Can this be done with other directives?
Answer the question
In order to leave comments, you need to log in
I don't remember it and most likely it just doesn't exist.
That is, if I don't confuse anything, OpenMP is an add-on for pthread, and the latter are initially designed for multi-core systems. Unlike Windows threads, originally aimed at user computers, where the processor had only one core.
Plus, OpenMP doesn't even have a thread priority setting.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question