mirror of https://github.com/CGAL/cgal
The gain on copies of T2 or T3 is the following:
afabri@klimt /cygdrive/c/cgal/next/Triangulation_3/benchmark/Triangulation_3
$ ./copy 1000000 2
36.806 sec
afabri@klimt /cygdrive/c/cgal/next/Triangulation_3/benchmark/Triangulation_3
$ ./copy 1000000 2
4.865 sec
The benchmarck copy.cpp is the following (not commited):
#define CGAL_T3_HASH
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Timer.h>
#include <CGAL/point_generators_3.h>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Delaunay_triangulation_3<K> Delaunay;
typedef K::Point_3 Point;
typedef CGAL::Creator_uniform_3<double,Point> Creator;
int main(int argc, char **argv)
{
int n=1000000;
int rep=100;
if (argc>=2)
n=atoi(argv[1]);
if (argc>=3)
rep=atoi(argv[2]);
std::vector<Point> points;
points.reserve(n);
CGAL::Random_points_in_sphere_3<Point,Creator> g(1);
CGAL::copy_n( g, n, std::back_inserter(points));
Delaunay original;
original.insert(points.begin(),points.end());
double res = 0;
for (int r=0;r<rep;++r){
CGAL::Timer t; t.start();
Delaunay delaunay=original;
t.stop();
res+=t.time();
}
std::cout << res << std::endl;
return 0;
}
|
||
|---|---|---|
| .. | ||
| benchmark/Triangulation_3 | ||
| demo | ||
| doc_tex | ||
| examples/Triangulation_3 | ||
| include/CGAL | ||
| package_info/Triangulation_3 | ||
| test/Triangulation_3 | ||
| TODO | ||
| dont_submit | ||