How many cores of I7 the c code is using

Indeterminant. Depends on:

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.
 

aarti_27

Honorable
Aug 2, 2012
2
0
10,510
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.