Click here to Skip to main content
15,888,454 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to resolve: error LNK2001: unresolved external symbol "public: static void * Pin
mlong3013-Feb-19 20:10
mlong3013-Feb-19 20:10 
AnswerRe: How to resolve: error LNK2001: unresolved external symbol "public: static void * Pin
Victor Nijegorodov13-Feb-19 21:34
Victor Nijegorodov13-Feb-19 21:34 
AnswerRe: How to resolve: error LNK2001: unresolved external symbol "public: static void * Pin
CPallini13-Feb-19 21:40
mveCPallini13-Feb-19 21:40 
QuestionRe: How to resolve: error LNK2001: unresolved external symbol "public: static void * Pin
Richard MacCutchan13-Feb-19 21:43
mveRichard MacCutchan13-Feb-19 21:43 
AnswerRe: How to resolve: error LNK2001: unresolved external symbol "public: static void * Pin
Davie2124014-Feb-19 5:02
Davie2124014-Feb-19 5:02 
QuestionOverriding problem Pin
NoviceEx10-Feb-19 7:02
NoviceEx10-Feb-19 7:02 
AnswerRe: Overriding problem Pin
Richard Andrew x6410-Feb-19 12:34
professionalRichard Andrew x6410-Feb-19 12:34 
GeneralRe: Overriding problem Pin
NoviceEx10-Feb-19 19:47
NoviceEx10-Feb-19 19:47 
AnswerRe: Overriding problem Pin
CPallini10-Feb-19 21:07
mveCPallini10-Feb-19 21:07 
GeneralRe: Overriding problem Pin
Davie2124014-Feb-19 5:03
Davie2124014-Feb-19 5:03 
QuestionUsing OpenMP - #of CPU or # of threads ? Pin
Vaclav_8-Feb-19 10:19
Vaclav_8-Feb-19 10:19 
AnswerRe: Using OpenMP - #of CPU or # of threads ? Pin
leon de boer8-Feb-19 21:35
leon de boer8-Feb-19 21:35 
AnswerRe: Using OpenMP - #of CPU or # of threads ? Pin
Richard MacCutchan8-Feb-19 22:36
mveRichard MacCutchan8-Feb-19 22:36 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
Vaclav_9-Feb-19 4:14
Vaclav_9-Feb-19 4:14 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
Richard MacCutchan9-Feb-19 6:40
mveRichard MacCutchan9-Feb-19 6:40 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
Vaclav_9-Feb-19 7:17
Vaclav_9-Feb-19 7:17 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
k50549-Feb-19 8:20
mvek50549-Feb-19 8:20 
I'd recommend you google for "openmp tutorial C++" and work through one or more of them. I don't know anything about OpenMP, except that its a MultiProcessing (i.e. threading) extension to C/C++. I do know that multi-threading is easy to get wrong. Added to which, having multiple threads means that you get out-of-order (to the human brain, anyway) execution, which can lead to unexpected results e.g. (the following code comes from one of the tutorials ... don't ask me anything further about it!)
<div class="op">Quote:</div>$ cat example.c 
 #include <omp.h>
 #include <stdio.h>

int main()
{
 #pragma omp parallel
    {
        int ID = omp_get_thread_num();
        printf("hello(%d)", ID);
        printf("world(%d)\n", ID);
    }

    return 0;
}
$ gcc -fopenmp example.c -o example
$ ./example
hello(1)world(1)
hello(0)world(0)
hello(3)world(3)
hello(2)world(2)
$ ./example
hello(3)world(3)
hello(0)world(0)
hello(1)world(1)
hello(2)world(2)
$ ./example
hello(3)world(3)
hello(2)hello(1)world(1)
hello(0)world(0)
world(2)
That's about as simple as a MP program gets, and you can see that
a) the threads didn't run in the same order every time, and
b) in the last run thread(2) was interrupted by thread(1) and thread(0) before it completed.

Proceed with caution!

modified 9-Feb-19 14:37pm.

GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
k50549-Feb-19 8:38
mvek50549-Feb-19 8:38 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
Vaclav_9-Feb-19 13:11
Vaclav_9-Feb-19 13:11 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
leon de boer9-Feb-19 16:52
leon de boer9-Feb-19 16:52 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
Vaclav_10-Feb-19 4:34
Vaclav_10-Feb-19 4:34 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
Richard MacCutchan10-Feb-19 6:42
mveRichard MacCutchan10-Feb-19 6:42 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
Richard MacCutchan9-Feb-19 22:42
mveRichard MacCutchan9-Feb-19 22:42 
QuestionC coding to evaluate an arithmetic expression Pin
Member 119317847-Feb-19 12:08
Member 119317847-Feb-19 12:08 
AnswerRe: C coding to evaluate an arithmetic expression Pin
jeron17-Feb-19 14:16
jeron17-Feb-19 14:16 

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.