Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

openmp parallel

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 jakussano   Members   

132
Like
0Likes
Like

Posted 02 November 2012 - 03:21 AM

how can i make an efficient parallel code from:

for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
for(k=0;k<n;k++)
{
for(o=k;o<n;o++)
{
//here i have 4 if conditions
}}}}

until now i made:

//#pragma omp parallel
{
//#pragma omp for schedule(dynamic,2) private(i,j,l,o,CostIJ,CostResIJ,aux)
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
for(k=0;k<n;k++)
{
for(o=k;o<n;o++)
{
//here i have 4 if conditions
}}}}

another ideea for better optimization?

#2 Álvaro   Members   

21091
Like
2Likes
Like

Posted 02 November 2012 - 02:05 PM

We need more information. At the very least, how large is n and how long does the single-threaded code take?




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.