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
Post a Comment