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

C / C++ / MFC

 
GeneralRe: (NULL == p) vs (p == NULL) Pin
PIEBALDconsult5-Aug-09 17:05
mvePIEBALDconsult5-Aug-09 17:05 
AnswerRe: (NULL == p) vs (p == NULL) Pin
PIEBALDconsult5-Aug-09 17:10
mvePIEBALDconsult5-Aug-09 17:10 
AnswerRe: (NULL == p) vs (p == NULL) Pin
Chuck O'Toole5-Aug-09 21:37
Chuck O'Toole5-Aug-09 21:37 
AnswerRe: (NULL == p) vs (p == NULL) Pin
Adam Roderick J5-Aug-09 21:54
Adam Roderick J5-Aug-09 21:54 
Questionusing the mouse programmatically Pin
Orchus5-Aug-09 10:08
Orchus5-Aug-09 10:08 
AnswerRe: using the mouse programmatically Pin
Luc Pattyn5-Aug-09 10:30
sitebuilderLuc Pattyn5-Aug-09 10:30 
AnswerRe: using the mouse programmatically Pin
«_Superman_»5-Aug-09 16:49
professional«_Superman_»5-Aug-09 16:49 
QuestionTroubles with OpenMp basics [modified] Pin
Andre_E_S5-Aug-09 8:45
Andre_E_S5-Aug-09 8:45 
Messing around trying to learn something and I'm having trouble seeing the time benefits in my openMP example.
Each array (pArray1 and pArray2) hold about 10meg of RGB bitmap data, bufferSize2 is the bmp file size. OpenMP is enabled in VS.

So I can run the following with or without #pragma and get the same 20Msec's or there about.
<br />
<br />
#pragma omp parallel for         //<-no impact on time<br />
  for(long loop=0;loop<bufferSize2;loop++)<br />
   pArrayResult[loop]= ~(pArray1[loop] - pArray2[loop]);<br />
<br />


I can try the common openMP example:
<br />
#pragma omp parallel<br />
{<br />
printf("hello world");<br />
}<br />


and never get something that looks like the example warning
helhelloo w world orld
I always get
hello world hello world

I can try
<br />
  #pragma omp parallel<br />
{ <br />
	int ID=omp_get_thread_num();<br />
        printf("Hello(%d)",ID);<br />
	printf("world(%d)",ID);<br />
}<br />

and the result is always sequential
hello(0)world(0) hello(1) world(1)

Anyone have an idea as to why everything seems sequential? What am I doing wrong?
Thanks,
Andre

modified on Friday, October 23, 2009 8:59 AM

AnswerRe: Troubles with OpenMp basics [modified] Pin
Andre_E_S23-Oct-09 1:58
Andre_E_S23-Oct-09 1:58 
QuestionCause of "Failed to create empty document" Pin
Dave Goodman5-Aug-09 8:32
Dave Goodman5-Aug-09 8:32 
AnswerRe: Cause of "Failed to create empty document" Pin
Steven Strouse24-Aug-09 2:32
Steven Strouse24-Aug-09 2:32 
Question0xC0000417 exception params Pin
Chesnokov Yuriy5-Aug-09 7:29
professionalChesnokov Yuriy5-Aug-09 7:29 
Questionerror connecrting sybase using ex_connect from a vc++ dll Pin
intermediate5-Aug-09 7:14
intermediate5-Aug-09 7:14 
QuestionWriting on Document form Dialog in SDI Pin
kudlaty795-Aug-09 5:56
kudlaty795-Aug-09 5:56 
AnswerRe: Writing on Document form Dialog in SDI Pin
David Crow5-Aug-09 6:04
David Crow5-Aug-09 6:04 
GeneralRe: Writing on Document form Dialog in SDI Pin
kudlaty795-Aug-09 9:15
kudlaty795-Aug-09 9:15 
AnswerRe: Writing on Document form Dialog in SDI Pin
David Crow5-Aug-09 9:22
David Crow5-Aug-09 9:22 
GeneralRe: Writing on Document form Dialog in SDI Pin
kudlaty7929-Aug-09 3:43
kudlaty7929-Aug-09 3:43 
AnswerRe: Writing on Document form Dialog in SDI Pin
David Crow29-Aug-09 16:02
David Crow29-Aug-09 16:02 
GeneralNew Project Pin
MrMcIntyre5-Aug-09 5:23
MrMcIntyre5-Aug-09 5:23 
GeneralRe: New Project Pin
Maximilien5-Aug-09 9:44
Maximilien5-Aug-09 9:44 
GeneralRe: New Project Pin
molesworth6-Aug-09 1:49
molesworth6-Aug-09 1:49 
GeneralRe: New Project Pin
MrMcIntyre6-Aug-09 1:59
MrMcIntyre6-Aug-09 1:59 
GeneralRe: New Project [modified] Pin
molesworth6-Aug-09 2:55
molesworth6-Aug-09 2:55 
GeneralRe: New Project Pin
MrMcIntyre6-Aug-09 4:55
MrMcIntyre6-Aug-09 4:55 

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.