Skip to main content
gamedev.net
🔒 Locked

openmp parallel

Started by ion.popescu 0 replies 1.4k views
Original Post
ion.popescu
ion.popescu
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?
alvaro
alvaro
We need more information. At the very least, how large is n and how long does the single-threaded code take?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.