Reputation: 158
I am designing a processor-intensive program in C using the Codeblocks IDE on Windows 8. I assume that by default, since my code is un-optimized, the minute I run it, it will only run on 1 core of my processor, leaving the other 3 cores idle.
Is my assumption correct? If yes, does using something like OpenMP to optimize my code will make it run faster? I am processing a list of data-sets and each data-set is independent of the other one. There is no dependability among them.
Upvotes: 0
Views: 1405
Reputation: 3242
Yes, by default your code will only run on one core.
If you have low dependability between threads, then running something like OpenMP should make your code run faster. How much faster depends on how much of your code is parallelizable.
Upvotes: 1