Sign in with
Sign up | Sign in
Your question

How many cores of I7 the c code is using

Last response: in CPUs
August 2, 2012 6:43:49 AM

Please give me information about how to calculate how many cores of I7 the code is using .

More about : cores code

August 2, 2012 1:11:51 PM

did you mean to paste this here?

this should be in a programming forum. and if it is a programming question google it, this is an easily answered question.
August 2, 2012 1:18:53 PM

And here is the question of the day!
Related resources
a b à CPUs
August 2, 2012 7:25:20 PM

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.
a c 162 à CPUs
August 2, 2012 9:52:19 PM

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.

Its really just a run it and see kinda deal
August 3, 2012 5:21:55 AM

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
a c 162 à CPUs
August 3, 2012 12:51:36 PM

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.