diff --git a/include/ftk/mesh/mpas_mesh.hh b/include/ftk/mesh/mpas_mesh.hh index c226fb92..edeb29a1 100644 --- a/include/ftk/mesh/mpas_mesh.hh +++ b/include/ftk/mesh/mpas_mesh.hh @@ -7,6 +7,7 @@ #include #include #include +#include namespace ftk { @@ -129,9 +130,18 @@ void mpas_mesh::initialize() // kd_cells.reset(new kd_t); // kd_cells->set_inputs(this->xyzCells); // kd_cells->build(); + + fprintf(stderr, "building kdlite..\n"); + typedef std::chrono::high_resolution_clock clock_type; + + auto t0 = clock_type::now(); kdlite_heap.resize( n_cells(), -1 ); kdlite_build<3>((int)n_cells(), xyzCells.data(), kdlite_heap.data()); + + auto t1 = clock_type::now(); + fprintf(stderr, "time_kdlite=%f\n", + std::chrono::duration_cast(t1-t0).count() * 1e-9); } template