Click here to Skip to main content
16,005,206 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAbout Multi Core Pin
bouli4-Nov-06 5:17
bouli4-Nov-06 5:17 
AnswerRe: About Multi Core Pin
Mark Salsbery4-Nov-06 8:42
Mark Salsbery4-Nov-06 8:42 
GeneralRe: About Multi Core Pin
bouli4-Nov-06 13:54
bouli4-Nov-06 13:54 
GeneralRe: About Multi Core Pin
Mark Salsbery4-Nov-06 16:07
Mark Salsbery4-Nov-06 16:07 
GeneralRe: About Multi Core Pin
bouli5-Nov-06 0:28
bouli5-Nov-06 0:28 
GeneralRe: About Multi Core Pin
Mark Salsbery5-Nov-06 8:14
Mark Salsbery5-Nov-06 8:14 
GeneralRe: About Multi Core Pin
bouli5-Nov-06 8:21
bouli5-Nov-06 8:21 
GeneralRe: About Multi Core Pin
Mark Salsbery5-Nov-06 8:53
Mark Salsbery5-Nov-06 8:53 
bouli wrote:
Sleep(0) is supposed to free the thread's quantum allocated by the system.


Right - I was wondering what would happen if you let the threads use their entire time-slice;

I don't know what goes on with processor cache and bus and RAM contention but just at the
SetPixel() call alone, only one thread will be able to write a pixel at a time unless your video
device can parallel process the calls.

I don't think it's paradoxal. I think the fastest performance you could get would be to have one
thread that does the IO (output a pixel) and 3 threads calculating the random coordinates and
feeding them to the pixel-outputter-thread. Just a guess, I could be way off Smile | :)

When you run it what does performance monitor show for CPU usage?
AnswerRe: About Multi Core Pin
Mark Salsbery4-Nov-06 8:57
Mark Salsbery4-Nov-06 8:57 
QuestionAccess control from a user defined class (CFormView based SDI application) [modified] Pin
cy163@hotmail.com4-Nov-06 4:55
cy163@hotmail.com4-Nov-06 4:55 
AnswerRe: Access control from a user defined class (CFormView based SDI application) Pin
Mark Salsbery4-Nov-06 8:19
Mark Salsbery4-Nov-06 8:19 
GeneralRe: Access control from a user defined class (CFormView based SDI application) Pin
cy163@hotmail.com5-Nov-06 2:39
cy163@hotmail.com5-Nov-06 2:39 
GeneralRe: Access control from a user defined class (CFormView based SDI application) Pin
cy163@hotmail.com5-Nov-06 3:52
cy163@hotmail.com5-Nov-06 3:52 
GeneralRe: Access control from a user defined class (CFormView based SDI application) Pin
Mark Salsbery5-Nov-06 7:38
Mark Salsbery5-Nov-06 7:38 
GeneralRe: Access control from a user defined class (CFormView based SDI application) [modified] Pin
cy163@hotmail.com5-Nov-06 18:27
cy163@hotmail.com5-Nov-06 18:27 
QuestionHow to create a child window with menu from a dialog based application? Pin
Cyber Friend4-Nov-06 4:52
Cyber Friend4-Nov-06 4:52 
QuestionReallocation Pin
hint_544-Nov-06 3:53
hint_544-Nov-06 3:53 
AnswerRe: Reallocation Pin
Waldermort4-Nov-06 4:55
Waldermort4-Nov-06 4:55 
GeneralRe: Reallocation Pin
hint_544-Nov-06 5:01
hint_544-Nov-06 5:01 
AnswerRe: Reallocation Pin
Michael Dunn4-Nov-06 10:29
sitebuilderMichael Dunn4-Nov-06 10:29 
Newshelp Pin
aliheydari4-Nov-06 2:27
aliheydari4-Nov-06 2:27 
GeneralRe: help Pin
George L. Jackson4-Nov-06 3:43
George L. Jackson4-Nov-06 3:43 
Questionget txt file size Pin
edvintas4-Nov-06 1:28
edvintas4-Nov-06 1:28 
AnswerRe: get txt file size Pin
fefe.wyx4-Nov-06 1:54
fefe.wyx4-Nov-06 1:54 
AnswerRe: get txt file size Pin
Eddie_NG4-Nov-06 2:38
Eddie_NG4-Nov-06 2:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.