use Real_timer

This commit is contained in:
Jane Tournois 2023-11-23 15:15:38 +01:00
parent 78730a1b8f
commit 64976a9f99
2 changed files with 13 additions and 10 deletions

View File

@ -16,7 +16,7 @@
#include <vector>
#include <fstream>
#include <CGAL/Timer.h>
#include <CGAL/Real_timer.h>
// Types
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
@ -54,7 +54,7 @@ int main(int argc, char* argv[])
return EXIT_FAILURE;
}
CGAL::Timer total_time;
CGAL::Real_timer total_time;
total_time.start();
// Creates implicit function from the read points using the default solver.
@ -95,6 +95,8 @@ int main(int argc, char* argv[])
Sphere(inner_point,sm_sphere_radius*sm_sphere_radius),
sm_dichotomy_error/sm_sphere_radius);
std::cout << "Surface created." << std::endl;
// Defines surface mesh generation criteria
CGAL::Surface_mesh_default_criteria_3<STr> criteria(sm_angle, // Min triangle angle (degrees)
sm_radius*average_spacing, // Max triangle size

View File

@ -23,7 +23,7 @@
#include <fstream>
#include <type_traits>
#include <CGAL/Timer.h>
#include <CGAL/Real_timer.h>
// Types
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
@ -52,13 +52,13 @@ void poisson_reconstruction(const PointSet& points, const char* output)
// Poisson options
FT sm_angle = 20.0; // Min triangle angle in degrees.
FT sm_radius = 100; // Max triangle size w.r.t. point set average spacing.
FT sm_radius = 1.; // Max triangle size w.r.t. point set average spacing.
FT sm_distance = 0.25; // Surface Approximation error w.r.t. point set average spacing.
CGAL::Timer time;
CGAL::Real_timer time;
time.start();
CGAL::Timer total_time;
CGAL::Real_timer total_time;
total_time.start();
// Creates implicit function from the read points using the default solver.
@ -176,15 +176,16 @@ int main(int argc, char* argv[])
std::cerr << "Error: cannot read file input file!" << std::endl;
return EXIT_FAILURE;
}
std::cout << "File " << file << " has been read." << std::endl;
std::cout << "File " << file << " has been read, "
<< points.size() << " points." << std::endl;
std::cout << "\n\n### Sequential mode ###" << std::endl;
poisson_reconstruction<CGAL::Sequential_tag>(points, "out_sequential.off");
#ifdef CGAL_LINKED_WITH_TBB
std::cout << "\n\n### Parallel mode ###" << std::endl;
poisson_reconstruction<CGAL::Parallel_tag>(points, "out_parallel.off");
#endif
std::cout << "\n\n### Sequential mode ###" << std::endl;
poisson_reconstruction<CGAL::Sequential_tag>(points, "out_sequential.off");
return EXIT_SUCCESS;
}