
Hello Madam or Sir, I am the user of OpenMesh, and I want ask some questions about the parallel code with OpenMesh, exactly, the parallel code is based on OpenMP on the VS2013. The first question: When I use the OpenMP on the VS2013 to speed up the program which write with OpenMesh, for example, I add the code: #pragma omp parallel for num_threads(7) , just like the following: and the errors follow, and I do not know why. and the second question: Could the code with iterator of OpenMesh be paralleled by OpenMP just like " for (TriMesh::FaceIter f_it = mesh.faces_begin(); f_it != mesh.faces_end(); f_it++) " in the above picture? or How can I parallel the code with iterator of OpenMesh? Thank you for your time! And I am looking forward to your reply. Sincerely LuWang

I don't think OpenMP gets along with iterator-based for loops. In these cases, I just use integer indices and convert to OpenMesh handles in the loop body. for (int fhi = 0; fhi < mesh.n_faces(); ++fhi) { TriMesh::FaceHandle fh = mesh.face_handle(fhi); TriMesh::HalfedgeHandle heh = mesh.halfedge_handle(fh); area[fhi] = mesh.calc_sector_area(heh); } On 2/15/19 2:21 AM, LuWang (Jack) wrote:
Hello Madam or Sir, I am the user of OpenMesh, and I want ask some questions about the parallel code with OpenMesh, exactly, the parallel code is based on OpenMP on the VS2013.
The first question: When I use the OpenMP on the VS2013 to speed up the program which write with OpenMesh, for example, I add the code: #pragma omp parallel for num_threads(7) , just like the following: and the errors follow, and I do not know why.
and the second question: Could the code with iterator of OpenMesh be paralleled by OpenMP just like " for (TriMesh::FaceIter f_it = mesh.faces_begin(); f_it != mesh.faces_end(); f_it++) " in the above picture? or How can I parallel the code with iterator of OpenMesh?
Thank you for your time! And I am looking forward to your reply.
Sincerely LuWang
_______________________________________________ OpenMesh mailing list -- openmesh@lists.rwth-aachen.de To unsubscribe send an email to openmesh-leave@lists.rwth-aachen.de https://lists.rwth-aachen.de/postorius/lists/openmesh.lists.rwth-aachen.de
-- Janis Born, M.Sc. RWTH Aachen University Visual Computing Institute Graphics, Geometry and Multimedia Ahornstraße 55 52074 Aachen Room 114 Phone: +49 241 8021803
participants (3)
-
Janis Born
-
LuWang (Jack)
-
mandasartur@gmail.com