How many cores of I7 the c code is using

Please give me information about how to calculate how many cores of I7 the code is using .
6 answers Last reply
More about cores code using
  1. 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.
  2. And here is the question of the day!
  3. 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.
  4. 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
  5. 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
  6. 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.
Ask a new question

Read More

CPUs Intel i7