Browse Source

omp error

Former-commit-id: 7da9a556f17a57686d756c7a74f606335cda5723
Alec Jacobson 9 years ago
parent
commit
69b7493a2d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      include/igl/ambient_occlusion.cpp

+ 1 - 1
include/igl/ambient_occlusion.cpp

@@ -32,9 +32,9 @@ IGL_INLINE void igl::ambient_occlusion(
   S.resize(n,1);
   VectorXi hits = VectorXi::Zero(n,1);
   // Embree seems to be parallel when constructing but not when tracing rays
-#pragma omp parallel for
   const MatrixXf D = random_dir_stratified(num_samples).cast<float>();
   // loop over mesh vertices
+#pragma omp parallel for
   for(int p = 0;p<n;p++)
   {
     const Vector3f origin = P.row(p).template cast<float>();