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: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] nef polygons with Microsoft's Parallel Patterns Library
  • Date: Thu, 27 Oct 2011 06:50:33 +0200

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.




Archive powered by MHonArc 2.6.16.

Top of Page