Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Parallelism of the function AABB_tree::closest_point_and_primitive()

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Parallelism of the function AABB_tree::closest_point_and_primitive()


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Parallelism of the function AABB_tree::closest_point_and_primitive()
  • Date: Thu, 5 Sep 2019 14:37:09 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:W7GvhRBGUjXW6CTMazUMUyQJP3N1i/DPJgcQr6AfoPdwSPX7rsbcNUDSrc9gkEXOFd2Cra4d0ayP7P+rBTNIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfK1+IA+roQjTtMQajoRvJ6QswRbVv3VEfPhby3l1LlyJhRb84cmw/J9n8ytOvv8q6tBNX6bncakmVLJUFDspPXw7683trhnDUBCA5mAAXWUMkxpHGBbK4RfnVZrsqCT6t+592C6HPc3qSL0/RDqv47t3RBLulSwKMSMy/mPKhcxqlK9VvQyvpxJ/zYDXbo+aOvVxcaHBct0VXmdBQsRcWjZdDo+gYYYCDewMNvtYoYnnoFsOqAOzCQexCuzx0TBHnGT23bE70+s/FwHNwQouH9UUsHTVq9X1KLoZXeS0wqbWyjXDau1Z2Svn6InIch4uu+2DXa53ccrLyUgjEg3JhUiXpIz+OzOV0f4Ns2mc7+p8T+6vjmonphp+ojiq3Mgsi43JipgJxVDD8CV02YA4LsC2Rk58ZN6rCppQtyeCOotwWMwtWHpnuCIkxbEcpZG7ey0KxZI6zBDcc/yKa5aE7g7nWeqLIjp1hGhpdK+hixux60StxezxWtGq3FlQsiZJj9zBuW4D2hHc78WIVPV980a91juKygze5fpLLVwxmKXFNpEu3LA9m58NvUnDECL7lkD7gaGSe0o59Oil7vjobannq5CCMYJ/lxvwPb40msOlBOQ1KggOUHaf+eS7zLDj+Ff2QLROjvEvnKjZtY3WKd0VpqO2AgJZyIkj6xG4Dzep1NQXg2MLI05CeBKCl4TpOlfOL+7kDfqnnVigjDNmy+rFM7DhGJnBM2bPnbT7cbty6kNQ0A8zwspe55JQBLEBOvXzWkrpudzDCh85NBa0w+fgCNVhzI8eXGaPD7SWMKPXq1CI5+YvL/OQa48SvTbxM+Il6OL2jX8lhV8derGk0ocYaH+iGvRqOliWYXv3gtgdDGcKpRE+QffxiFyCVD5Tf2y9U7g95jE9EoKmDJ3MSpqjgLybj2+HGchdaWlCT1yNCnz1bJ6sWvEWaSvULNUyvCYDUO3rcIIr3AqytQL8g55gNOvT5mVYmp/k0dVp/fz9nBou8iZlTo7Vh3qJSHt1mX9OQjse06V2oEg7wVCGh/sry8dEHMBesqsaGjwxMoTRmrQjVoLCHznZd9LMc26IB9WrBTZrE4A0yt4KJll4QpCs0k6F0C2tDLsY0beMAc5sq/OO7z3KP894jk3++uwkhlgiTNFIMDT/1KF6/gnXQYXOlhfAzvr4ReEnxCfIsVy74y+WpkgBCVx/VKzEWTYUYU6E9dk=

Before trying to make it running in parallel, did you try calling
tree.accelerate_distance_queries()?

This should greatly improve the runtime.

Sebastien.

On 9/5/19 2:33 PM, Yana Nehme wrote:
Hi,

I want to parallelise, with OpenMP, a matching process based on the AABB
Tree.
Indeed, we have 2 meshes: the reference ("m_poly_original") and the
distorded model ("m_poly_degrad" having a PointMap "pm_degrad"). For each
vertex of the distorted mesh, we compute its nearest 3D point on the surface
of the reference model using the AABB tree structure. For parallel
execution, we use the OpenMP parallel loop. The code is as follows:

auto original_faces = faces(m_poly_original);

FaceIterator orig_begin = original_faces.first;
FaceIterator orig_end = original_faces.second;

AABB_Tree tree(orig_begin, orig_end, m_poly_original);
tree.accelerate_distance_queries();

#pragma omp parallel for
for (int i = 0; i < (int)num_vertices(m_poly_degrad); i++)
{
Vertex_Descriptor vi(i);

// computes closest point and primitive id
Point_and_primitive_id pp =
tree.closest_point_and_primitive(get(pm_degrad, vi));
auto f_nearest = pp.second; // closest primitive id
}


However, the program crashes with a critical error detected c0000374.

Note that, I am using visual studio Express 2015 (openMp version 2.0) on
Windows 10.

It is possible to parallize the function
AABB_tree::closest_point_and_primitive()? How can I handle this kind of
problem?

Any help would be greatly appreciated.

Regards,
Yana Nehme



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/




Archive powered by MHonArc 2.6.18.

Top of Page