OpenMP use with Surface mesh

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenMP use with Surface mesh

Shankar Kulumani
Hello

I'm computing many properties over the elements of a surface mesh, all edges, half edges and faces.

Currently this is done using the respective edges, face, halfedge iterator ranges.

Once calculated the properties are stored as properties within the surface mesh.

Is it possible to iterate through these elements using a parallel loop, i.e. OpenMP parallel for?

I'm of course just going to try but was wondering if there are any issues to be aware of or things to consider. 

Thank you for the great project. 
Reply | Threaded
Open this post in threaded view
|

Re: OpenMP use with Surface mesh

Sebastien Loriot (GeometryFactory)
What do you want to do? iterator over properties in parallel
or over one property in a parallel loop?

In the former case, not pb.
In the latter case, you need an integer range IIRC with OpenMP.
So in the case of Surface_mesh it is possible only if the mesh
has no garbage (otherwise the simplex incides are not contiguous).

Sebastien.

On 06/07/2018 12:58 PM, Shankar Kulumani wrote:

> Hello
>
> I'm computing many properties over the elements of a surface mesh, all
> edges, half edges and faces.
>
> Currently this is done using the respective edges, face, halfedge
> iterator ranges.
>
> Once calculated the properties are stored as properties within the
> surface mesh.
>
> Is it possible to iterate through these elements using a parallel loop,
> i.e. OpenMP parallel for?
>
> I'm of course just going to try but was wondering if there are any
> issues to be aware of or things to consider.
>
> Thank you for the great project.

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: OpenMP use with Surface mesh

Shankar Kulumani
I'll be iterating over a single property in parallel. For example computing all normal vectors for the faces.

Thanks for you suggestion on garbage collection. I'll try to ensure that if items are removed that the garbage is collected.

On Thu, Jun 7, 2018 at 7:50 AM Sebastien Loriot (GeometryFactory) <[hidden email]> wrote:
What do you want to do? iterator over properties in parallel
or over one property in a parallel loop?

In the former case, not pb.
In the latter case, you need an integer range IIRC with OpenMP.
So in the case of Surface_mesh it is possible only if the mesh
has no garbage (otherwise the simplex incides are not contiguous).

Sebastien.

On 06/07/2018 12:58 PM, Shankar Kulumani wrote:
> Hello
>
> I'm computing many properties over the elements of a surface mesh, all
> edges, half edges and faces.
>
> Currently this is done using the respective edges, face, halfedge
> iterator ranges.
>
> Once calculated the properties are stored as properties within the
> surface mesh.
>
> Is it possible to iterate through these elements using a parallel loop,
> i.e. OpenMP parallel for?
>
> I'm of course just going to try but was wondering if there are any
> issues to be aware of or things to consider.
>
> Thank you for the great project.

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss