Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] nef polygons with Microsoft's Parallel Patterns Library

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] nef polygons with Microsoft's Parallel Patterns Library


Chronological Thread 
  • From: Cody Rose <>
  • To:
  • Subject: Re: [cgal-discuss] nef polygons with Microsoft's Parallel Patterns Library
  • Date: Thu, 27 Oct 2011 12:36:31 -0700

On 10/26/2011 9:50 PM, Sebastien Loriot (GeometryFactory) wrote:
Cody Rose wrote:
Hello,

Can nef polygons be used with Microsoft's PPL? The following code (CGAL 3.8) crashes during construction of either nef_polygon, even with CGAL_HAS_THREADS defined:

#include <cstdio>
#include <ppl.h>
#include <concurrent_vector.h>
#include <CGAL/Extended_cartesian.h>
#include <CGAL/CORE_Expr.h>
#include <CGAL/Nef_polyhedron_2.h>

typedef CORE::Expr NT;
typedef CGAL::Extended_cartesian<NT> K;
typedef CGAL::Nef_polyhedron_2<K> nef_polygon;

int main() {
Concurrency::parallel_invoke(([]() { nef_polygon p; }), ([]() { nef_polygon q; }));
printf("success\n");
return 0;
}

If this doesn't work, are nef polygons otherwise concurrency-safe? (i.e. should using them with boost::thread, for example, work?)

Cody

From what I know, the implementation has not been done while
thinking about thread-safety, so I would not expect it to be.

Sebastien.


I actually got in touch with the creators of CORE and they said that the whole CORE library isn't thread-safe, unfortunately, but thank you for your response.

Cody




Archive powered by MHonArc 2.6.16.

Top of Page