File tree Expand file tree Collapse file tree 3 files changed +74
-0
lines changed
benchmark/Spatial_sorting Expand file tree Collapse file tree 3 files changed +74
-0
lines changed Original file line number Diff line number Diff line change 1+ # Created by the script cgal_create_cmake_script
2+ # This is the CMake script for compiling a CGAL application.
3+
4+
5+ project ( Spatial_sorting_ )
6+
7+ cmake_minimum_required (VERSION 2.6.2)
8+ if ("${CMAKE_MAJOR_VERSION} .${CMAKE_MINOR_VERSION} " VERSION_GREATER 2.6)
9+ if ("${CMAKE_MAJOR_VERSION} .${CMAKE_MINOR_VERSION} .${CMAKE_PATCH_VERSION} " VERSION_GREATER 2.8.3)
10+ cmake_policy (VERSION 2.8.4)
11+ else ()
12+ cmake_policy (VERSION 2.6)
13+ endif ()
14+ endif ()
15+
16+ find_package (CGAL QUIET COMPONENTS Core )
17+
18+ if ( CGAL_FOUND )
19+
20+ include ( ${CGAL_USE_FILE} )
21+
22+ include ( CGAL_CreateSingleSourceCGALProgram )
23+
24+ include_directories (BEFORE "../../include" )
25+
26+ create_single_source_cgal_program( "simple.cpp" )
27+
28+ else ()
29+
30+ message (STATUS "This program requires the CGAL library, and will not be compiled." )
31+
32+ endif ()
33+
Original file line number Diff line number Diff line change 1+ // #define CGAL_PROFILE
2+ // #define CGAL_USE_SSE2_FABS
3+ // #define CGAL_USE_SSE2_MAX
4+ // #define CGAL_MSVC_USE_STD_FABS // use this one with precise
5+ #define CGAL_DONT_USE_INDEPENDENT_SHUFFLE 1
6+
7+ #include < CGAL/Exact_predicates_inexact_constructions_kernel.h>
8+
9+
10+ #include < CGAL/Delaunay_triangulation_3.h>
11+
12+
13+ #include < CGAL/Timer.h>
14+ #include < iostream>
15+
16+ typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
17+ typedef CGAL::Delaunay_triangulation_3<K> DT;
18+ typedef K::Point_3 Point_3;
19+ typedef CGAL::Timer Timer;
20+
21+ int main ()
22+ {
23+
24+ std::vector<Point_3> points;
25+ Point_3 p;
26+
27+ while (std::cin >> p){
28+ points.push_back (p);
29+ }
30+ Timer timer;
31+ timer.start ();
32+ int N = 0 ;
33+ for (int i = 0 ; i < 5 ; i++){
34+ spatial_sort (points.begin (), points.end ());
35+ }
36+ timer.stop ();
37+
38+ std::cerr << timer.time () << " sec" << std::endl;
39+ return 0 ;
40+ }
Original file line number Diff line number Diff line change 1+ benchmark
You can’t perform that action at this time.
0 commit comments