mirror of https://github.com/CGAL/cgal
Always use Parallel_if_available_tag in examples
This commit is contained in:
parent
1d251d57db
commit
6c91c5af1e
|
|
@ -54,7 +54,7 @@ void run_marching_cubes(const Grid& grid,
|
||||||
Polygon_range triangles;
|
Polygon_range triangles;
|
||||||
|
|
||||||
// run marching cubes isosurfacing
|
// run marching cubes isosurfacing
|
||||||
IS::marching_cubes(domain, isovalue, points, triangles);
|
IS::marching_cubes<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles);
|
||||||
|
|
||||||
std::cout << "Output #vertices: " << points.size() << std::endl;
|
std::cout << "Output #vertices: " << points.size() << std::endl;
|
||||||
std::cout << "Output #triangles: " << triangles.size() << std::endl;
|
std::cout << "Output #triangles: " << triangles.size() << std::endl;
|
||||||
|
|
@ -95,7 +95,7 @@ void run_dual_contouring(const Grid& grid,
|
||||||
Polygon_range triangles;
|
Polygon_range triangles;
|
||||||
|
|
||||||
// run dual contouring isosurfacing
|
// run dual contouring isosurfacing
|
||||||
IS::dual_contouring(domain, isovalue, points, triangles);
|
IS::dual_contouring<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles);
|
||||||
|
|
||||||
std::cout << "Output #vertices: " << points.size() << std::endl;
|
std::cout << "Output #vertices: " << points.size() << std::endl;
|
||||||
std::cout << "Output #triangles: " << triangles.size() << std::endl;
|
std::cout << "Output #triangles: " << triangles.size() << std::endl;
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ void run_marching_cubes(const Grid& grid,
|
||||||
Polygon_range triangles;
|
Polygon_range triangles;
|
||||||
|
|
||||||
// run Marching Cubes
|
// run Marching Cubes
|
||||||
CGAL::Isosurfacing::marching_cubes(domain, isovalue, points, triangles);
|
CGAL::Isosurfacing::marching_cubes<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles);
|
||||||
|
|
||||||
timer.stop();
|
timer.stop();
|
||||||
|
|
||||||
|
|
@ -101,7 +101,7 @@ void run_dual_contouring(const Grid& grid,
|
||||||
Polygon_range triangles;
|
Polygon_range triangles;
|
||||||
|
|
||||||
// run Dual Contouring
|
// run Dual Contouring
|
||||||
CGAL::Isosurfacing::dual_contouring<CGAL::Sequential_tag>(domain, isovalue, points, triangles,
|
CGAL::Isosurfacing::dual_contouring<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles,
|
||||||
CGAL::parameters::do_not_triangulate_faces(true));
|
CGAL::parameters::do_not_triangulate_faces(true));
|
||||||
|
|
||||||
timer.stop();
|
timer.stop();
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ void run_marching_cubes(const Grid& grid,
|
||||||
Polygon_range triangles;
|
Polygon_range triangles;
|
||||||
|
|
||||||
// execute marching cubes
|
// execute marching cubes
|
||||||
IS::marching_cubes(domain, isovalue, points, triangles);
|
IS::marching_cubes<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles);
|
||||||
|
|
||||||
std::cout << "Output #vertices: " << points.size() << std::endl;
|
std::cout << "Output #vertices: " << points.size() << std::endl;
|
||||||
std::cout << "Output #triangles: " << triangles.size() << std::endl;
|
std::cout << "Output #triangles: " << triangles.size() << std::endl;
|
||||||
|
|
@ -75,7 +75,7 @@ void run_dual_contouring(const Grid& grid,
|
||||||
Polygon_range triangles;
|
Polygon_range triangles;
|
||||||
|
|
||||||
// run dual contouring isosurfacing
|
// run dual contouring isosurfacing
|
||||||
IS::dual_contouring(domain, isovalue, points, triangles);
|
IS::dual_contouring<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles);
|
||||||
|
|
||||||
std::cout << "Output #vertices: " << points.size() << std::endl;
|
std::cout << "Output #vertices: " << points.size() << std::endl;
|
||||||
std::cout << "Output #triangles: " << triangles.size() << std::endl;
|
std::cout << "Output #triangles: " << triangles.size() << std::endl;
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ void run_marching_cubes(const Grid& grid,
|
||||||
|
|
||||||
// run marching cubes
|
// run marching cubes
|
||||||
std::cout << "Running Marching Cubes with isovalue = " << offset_value << std::endl;
|
std::cout << "Running Marching Cubes with isovalue = " << offset_value << std::endl;
|
||||||
CGAL::Isosurfacing::marching_cubes(domain, offset_value, points, triangles);
|
CGAL::Isosurfacing::marching_cubes<CGAL::Parallel_if_available_tag>(domain, offset_value, points, triangles);
|
||||||
|
|
||||||
std::cout << "Output #vertices (MC): " << points.size() << std::endl;
|
std::cout << "Output #vertices (MC): " << points.size() << std::endl;
|
||||||
std::cout << "Output #triangles (MC): " << triangles.size() << std::endl;
|
std::cout << "Output #triangles (MC): " << triangles.size() << std::endl;
|
||||||
|
|
@ -115,7 +115,8 @@ void run_dual_contouring(const Grid& grid,
|
||||||
|
|
||||||
// run dual contouring
|
// run dual contouring
|
||||||
std::cout << "Running Dual Contouring with isovalue = " << offset_value << std::endl;
|
std::cout << "Running Dual Contouring with isovalue = " << offset_value << std::endl;
|
||||||
CGAL::Isosurfacing::dual_contouring(domain, offset_value, points, triangles,
|
CGAL::Isosurfacing::dual_contouring<CGAL::Parallel_if_available_tag>(
|
||||||
|
domain, offset_value, points, triangles,
|
||||||
CGAL::parameters::do_not_triangulate_faces(true));
|
CGAL::parameters::do_not_triangulate_faces(true));
|
||||||
|
|
||||||
std::cout << "Output #vertices (DC): " << points.size() << std::endl;
|
std::cout << "Output #vertices (DC): " << points.size() << std::endl;
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
// run dual contouring isosurfacing
|
// run dual contouring isosurfacing
|
||||||
std::cout << "Running Dual Contouring with isovalue = " << isovalue << std::endl;
|
std::cout << "Running Dual Contouring with isovalue = " << isovalue << std::endl;
|
||||||
CGAL::Isosurfacing::dual_contouring(domain, isovalue, points, triangles,
|
CGAL::Isosurfacing::dual_contouring<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles,
|
||||||
CGAL::parameters::do_not_triangulate_faces(true)
|
CGAL::parameters::do_not_triangulate_faces(true)
|
||||||
.constrain_to_cell(false));
|
.constrain_to_cell(false));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ int main(int argc, char** argv)
|
||||||
Polygon_range triangles;
|
Polygon_range triangles;
|
||||||
|
|
||||||
std::cout << "--- Dual Contouring (Dichotomy)" << std::endl;
|
std::cout << "--- Dual Contouring (Dichotomy)" << std::endl;
|
||||||
IS::dual_contouring(domain, isovalue, points, triangles,
|
IS::dual_contouring<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles,
|
||||||
CGAL::parameters::do_not_triangulate_faces(!triangulate_faces));
|
CGAL::parameters::do_not_triangulate_faces(!triangulate_faces));
|
||||||
|
|
||||||
timer.stop();
|
timer.stop();
|
||||||
|
|
@ -96,7 +96,7 @@ int main(int argc, char** argv)
|
||||||
Polygon_range triangles;
|
Polygon_range triangles;
|
||||||
|
|
||||||
std::cout << "--- Dual Contouring (Linear Interpolation)" << std::endl;
|
std::cout << "--- Dual Contouring (Linear Interpolation)" << std::endl;
|
||||||
IS::dual_contouring(domain, isovalue, points, triangles,
|
IS::dual_contouring<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles,
|
||||||
CGAL::parameters::do_not_triangulate_faces(!triangulate_faces));
|
CGAL::parameters::do_not_triangulate_faces(!triangulate_faces));
|
||||||
|
|
||||||
timer.stop();
|
timer.stop();
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ int main(int argc, char** argv)
|
||||||
Polygon_range triangles;
|
Polygon_range triangles;
|
||||||
|
|
||||||
// run Dual Contouring
|
// run Dual Contouring
|
||||||
CGAL::Isosurfacing::dual_contouring<CGAL::Sequential_tag>(domain, isovalue, points, triangles,
|
CGAL::Isosurfacing::dual_contouring<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles,
|
||||||
CGAL::parameters::do_not_triangulate_faces(true));
|
CGAL::parameters::do_not_triangulate_faces(true));
|
||||||
|
|
||||||
timer.stop();
|
timer.stop();
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ int main(int argc, char** argv)
|
||||||
Polygon_range triangles;
|
Polygon_range triangles;
|
||||||
|
|
||||||
std::cout << "--- Dual Contouring (QEM - unconstrained)" << std::endl;
|
std::cout << "--- Dual Contouring (QEM - unconstrained)" << std::endl;
|
||||||
IS::internal::Dual_contourer<CGAL::Sequential_tag, Domain,
|
IS::internal::Dual_contourer<CGAL::Parallel_if_available_tag, Domain,
|
||||||
IS::internal::DC_Strategy::QEM> contourer;
|
IS::internal::DC_Strategy::QEM> contourer;
|
||||||
contourer(domain, isovalue, points, triangles,
|
contourer(domain, isovalue, points, triangles,
|
||||||
CGAL::parameters::do_not_triangulate_faces(!triangulate_faces));
|
CGAL::parameters::do_not_triangulate_faces(!triangulate_faces));
|
||||||
|
|
@ -91,7 +91,7 @@ int main(int argc, char** argv)
|
||||||
Polygon_range triangles;
|
Polygon_range triangles;
|
||||||
|
|
||||||
std::cout << "--- Dual Contouring (QEM - constrained)" << std::endl;
|
std::cout << "--- Dual Contouring (QEM - constrained)" << std::endl;
|
||||||
IS::internal::Dual_contourer<CGAL::Sequential_tag, Domain,
|
IS::internal::Dual_contourer<CGAL::Parallel_if_available_tag, Domain,
|
||||||
IS::internal::DC_Strategy::QEM> contourer;
|
IS::internal::DC_Strategy::QEM> contourer;
|
||||||
contourer(domain, isovalue, points, triangles,
|
contourer(domain, isovalue, points, triangles,
|
||||||
CGAL::parameters::do_not_triangulate_faces(!triangulate_faces)
|
CGAL::parameters::do_not_triangulate_faces(!triangulate_faces)
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
// run marching cubes isosurfacing
|
// run marching cubes isosurfacing
|
||||||
std::cout << "Running Marching Cubes with isovalue = " << isovalue << std::endl;
|
std::cout << "Running Marching Cubes with isovalue = " << isovalue << std::endl;
|
||||||
CGAL::Isosurfacing::marching_cubes(domain, isovalue, points, triangles,
|
CGAL::Isosurfacing::marching_cubes<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles,
|
||||||
CGAL::parameters::use_topologically_correct_marching_cubes(true));
|
CGAL::parameters::use_topologically_correct_marching_cubes(true));
|
||||||
|
|
||||||
std::cout << "Output #vertices: " << points.size() << std::endl;
|
std::cout << "Output #vertices: " << points.size() << std::endl;
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
// run marching cubes isosurfacing
|
// run marching cubes isosurfacing
|
||||||
std::cout << "Running Marching Cubes with isovalue = " << isovalue << std::endl;
|
std::cout << "Running Marching Cubes with isovalue = " << isovalue << std::endl;
|
||||||
CGAL::Isosurfacing::marching_cubes(domain, isovalue, points, triangles,
|
CGAL::Isosurfacing::marching_cubes<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles,
|
||||||
CGAL::parameters::use_topologically_correct_marching_cubes(false));
|
CGAL::parameters::use_topologically_correct_marching_cubes(false));
|
||||||
|
|
||||||
timer.stop();
|
timer.stop();
|
||||||
|
|
@ -74,7 +74,7 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
// run marching cubes isosurfacing
|
// run marching cubes isosurfacing
|
||||||
std::cout << "Running Marching Cubes (TMC) with isovalue = " << isovalue << std::endl;
|
std::cout << "Running Marching Cubes (TMC) with isovalue = " << isovalue << std::endl;
|
||||||
CGAL::Isosurfacing::marching_cubes(domain, isovalue, points, triangles,
|
CGAL::Isosurfacing::marching_cubes<CGAL::Parallel_if_available_tag>(domain, isovalue, points, triangles,
|
||||||
CGAL::parameters::use_topologically_correct_marching_cubes(true));
|
CGAL::parameters::use_topologically_correct_marching_cubes(true));
|
||||||
|
|
||||||
timer.stop();
|
timer.stop();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue