以下代码(Pg.187,Rourke 的 C 语言计算几何)需要相同的时间来串行运行和并行运行(2 proc)。请帮我找出问题所在。这是平行部分
int chunk;
chunk=10;
#pragma omp parallel private(i,j,k,xn,yn,zn)
{
#pragma omp for schedule(static,chunk)
for(i=0;i<n-2;i++)
{
for(j=i+1;j<n;j++)
for(k=i+1;k<n;k++)
if(j!=k)
{
xn=(y[j]-y[i])*(z[k]-z[i])-(y[k]-y[i])*(z[j]-z[i]);
yn=(x[k]-x[i])*(z[j]-z[i])-(x[j]-x[i])*(z[k]-z[i]);
zn=(x[j]-x[i])*(y[k]-y[i])-(x[k]-x[i])*(y[j]-y[i]);
if(flag=(zn<0))
for(m=0;m<n;m++)
flag=flag && ((x[m]-x[i])*xn + (y[m]-y[i])*yn + (z[m]-z[i])*zn <=0);
if (flag)
printf("%d\t%d\t%d\n",i,j,k);
}
}
}