Jump to content

  • Log In with Google      Sign In   
  • Create Account


openmp parallel


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   -  Reputation: 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?

Sponsor:

#2 Álvaro   Crossbones+   -  Reputation: 11882

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.



PARTNERS