C++/g++: Concurrent program -


I get a C ++ program (source) that is said to work in parallel. However, if I compile it (I am using Ubuntu 10.04 and G ++ 4.4.3) with G ++ and run it, then one of my two CPU cores gets loaded while another is " Nothing "is doing.

I spoke to those who gave me the program. I was told that I had to set specific flags for G ++ to get the compiled program for 2 CPU core. However, if I look at the code, then I think that there is no line that indicates parallelism.

Then I have two questions:

  • Is any C ++ - it is possible to type parallel code for internal multi-threaded applications, i.e. without any additional libraries ( Because I do not include any non-standard library)? Is it true that there are actually flags for G ++ compiler to compile the program for 2 CPU cores and compile it so that it is parallel (and if: what are they )?

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -