   Multiple cores on c++? Automatically used?
  HiI just got my first multi-core computer (yey!). I code games in c++ for windows using a directx 9 engine. Is processes automatically send to different cores? Or if i dont do anything will my games only use 1 core even its a quadcore for example?ThanksErik   
  The OS can and will allocate processes and threads to different cores as it desires. That basic distribution is done automatically. This does not however mean that suddenly your program distributes work in parallel properly. A single process, single threaded program doing all the work will force all the work on one core. There's nothing the OS can do further.So it's your task to set things up properly.   ;  so if i just use a win32 application setup in visual studio probably only one core is used?E   ;Quote:Original post by sulimanso if i just use a win32 application setup in visual studio probably only one core is used?EYes (Mostly). You'll need to create multiple threads to use multiple cores.The OS can still schedule your app (It's main thread at least) to run on any core, but it'll only run on one at a time.   ;Quote:so if i just use a win32 application setup in visual studio probably only one core is used?By your app? Not probably. Definitely. The template projects don't do anything with threading, at least not in any fashion that would noticeably benefit you. You've got to build it all yourself (or use a library to help, I suppose).   ;Quote:Original post by sulimanso if i just use a win32 application setup in visual studio probably only one core is used?EEvery OS which supports multithreading exposes its own API to split work into threads. For c++ I've found boost::thread to be quite simple to work with, and it is cross platform too.Other languages (.net, java, most of the new one actually) already have classes/functions in their standard library.   ;  OpenMP is very very good for cheap and dirty parallelism.   