Im developping a traffic training simulator for my Ph. D. thesis. I use VC++ 9.0 and some graphic libraries such as Open Scene Graph, Open Dynamics Engine and etc. My CPU is Intel Core i7 930 @ 2.8GHz and my graphics card is Nvidia Quadro FX 1800.
In simulation loop I control the behaviors of vehicles on traffic. But only one core running for this action. So I dont take performance enoughly. I try to use parallel programming with OpenMP (shown below), but it didnt worked.
#pragma omp parallel for private(j)
The Codes as shown above, I control the behaviors of vehicles while moving autonomously.Id like to divide to control vehicles to my core number (8). For example If the number of vehicles is 80, then every core controls 10 vehicles.
How can I do this process by using OpenMP?
Have a good study,