C Language Program Compiled Will it use multicore cpu? -


platform: windows xp processor : dual core

i have program written in c language compiled , exe formed. question program use both cores (since machine dual core) or have make program multithreaded in order ?

you have implement multithreaded program when want use multiple cores.

there plenty of threading libraries out there. i'd recommend have openmp, quite easy integrate , use parallization.

edit: simple example:

normally can parallelize for loops adding:

#pragma omp parallel for(...) 

of course, have link against openmp , compile openmp support.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -