Cross platform multithreading in C++?

Currently my recommendation would be OpenMP (libgomp on g++, IBM XlC++, MSVC++ all support it) OpenMP offers a simple way of exploiting parallelism without interfering with algorithm design; an OpenMP program compiles and operates correctly in both parallel and serial execution environments. Using OpenMP's directive-based parallelism also simplifies the act of converting existing serial code to efficient parallel code See msdn And GOMP for starting points Random quote: To remain relevant, free software development tools must support emerging technologies. By implementing OpenMP, GOMP provides a simplified syntax tools for creating software targeted at parallel architectures.

OpenMP's platform-neutral syntax meshes well with the portability goals of GCC and other GNU projects.

Currently my recommendation would be OpenMP (libgomp on g++, IBM XlC++, MSVC++ all support it) OpenMP offers a simple way of exploiting parallelism without interfering with algorithm design; an OpenMP program compiles and operates correctly in both parallel and serial execution environments. Using OpenMP's directive-based parallelism also simplifies the act of converting existing serial code to efficient parallel code. See msdn And GOMP for starting points Random quote: To remain relevant, free software development tools must support emerging technologies.By implementing OpenMP, GOMP provides a simplified syntax tools for creating software targeted at parallel architectures.

OpenMP's platform-neutral syntax meshes well with the portability goals of GCC and other GNU projects.

You probably want boost::thread or Intels' Thread Building Blocks. I'd recommend TBB but it's not free, I think, so boost::thread for the free option.

Free is a requirement pretty damn high on the list :-P Thanks for the Boost recommendation. I've seen it before in various places, but never new it was good for multithreading - thanks! – JamWaffles Apr 7 at 9:06 Intel's TBB is free, in fact: available under GPL.

See threadingbuildingblocks.org. – Alexey Kukanov May 4 at 20:15.

My favourite is QThread. Part of Qt library.

1 Thanks for the recommendation. I'm not too keen on using an entire framework just for multithreading (although Boost is similar), but this will come in handy when I start writing apps in Qt. – JamWaffles Apr 7 at 9:29 Nope, boost is not similar.

Boost is not a framework, but a loose collection of libraries and utilities. If you only need multithreading, you could even extract the boost/thread library only and include/link that one. – Mephane Apr 7 at 12:26.

If you can use c++0x threads, then use that. If not, boost::thread is the best free multi-platform library.

Thanks. Is C++0x cross platform though? Sorry for the noob question, but I can't find an answer on the net.

– JamWaffles Apr 7 at 9:20 @JamWaffles Yes, but that really depends whether a compiler supports it. C++0x is still not standardized. – VJo Apr 7 at 9:23 Ah ok.

I've been reading around and it looks good, if a little confusing. I think boost is the way to go, but +1 for the good alternative - I hope this makes it into the C++ standard. – JamWaffles Apr 7 at 9:28 @JamWaffles C++0x is the new standard.It will likely be finalized this year.

– sftrabbit Apr 7 at 10:18 Awesome! Thanks for the heads up. – JamWaffles Apr 7 at 11:13.

Another nice library that includes cross platform threads is poco.

I want to make, or find, a simple, platform independent concurrency (aka threading) lib for C. I want to implement this without the use of OS-dependent threading APIs. It doesn't need to be "true threading", which is why I avoided the use of the term.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions