C++ (Qt) FaceSet result; // using FaceSet = QSet<Face>; const VolumeNumberList &volumeNumbers = mesh()->volumeNumbers(); // byval QVector PARALLEL_FOR for (int i = 0; i < volumeNumbers.count(); ++i){ //taking volume byref const MeshVolume &volume = mesh()->volume(volumeNumbers.at(i)); // Read of size 2 at 0x7b080008b95c by thread T13: const auto &volumeRange = volume.range(); // can modify mutable range_ if (!isVolumeHasToBeChecked(volume, filter) || !hasIntersection(line, volumeRange)){ continue; } const auto &shell = volume.shell(); //by value const auto &shellFaces = shell.shellFaces(); //by value QVector const FaceSet &volumeResult = intersectedFacesWithLine(line, shellFaces); // byval QSet SCALAR{ result += volumeResult; } } return result;
C++ (Qt)#ifdef _OPENMP#define PARALLEL_FOR _Pragma("omp parallel for")#define SCALAR _Pragma("omp critical")#else#define PARALLEL_FOR#define SCALAR#endif
C++ (Qt)PARALLEL_FORfor (i in range) { const Triangle triangle(vertices_, i); .....} Triangle::Triangle(vertex_map *vertices, int i) : a(vertices.at(i)), b(vertices.at(i+1)), c(vertices.at(i+2)){}