A: How many threads are being used
B: If the threads are parallel
C: How the OS scheduler decides to schedule the threads
No programmer EVER makes any assumption about core avaliability. We create a thread, and leave it to the OS to determine what core that thread goes on.
Crack open task manager and see how many threads are showing activity, that is the best way to check. It will also vary depending on the OS, CPU, compiler, and flags set within the compiler.
In the task manager the thread activity is not shown can u send me screen shot where it is showing this information . I want to decide exactly how many cores the code is utilizing not the threads
Go into the processes tab, then under tools > CPU graphs there should be an option of one graph per core instead of one graph per CPU.
Active threads are really what determines how well it scales with the addition of more cores in the CPU. In an AMD based system each active thread will tend to run on a different core, while Intel based systems confuse this a bit with hyper threading you can still assume each Hyper thread to be equivalent of a separate core when checking scaling.