static double TimeFindPrimes( int nthread ) { Primes.clear(); tbb::task_scheduler_init init(nthread); tbb::tick_count t0 = tbb::tick_count::now(); tbb::parallel_for( tbb::blocked_range<Number>(0,1000000,500), FindPrimes() ); tbb::tick_count t1 = tbb::tick_count::now(); return (t1-t0).seconds(); }
bool clear_keyframes(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res) { boost::mutex::scoped_lock lock(closest_keyframe_update_mutex); keyframes.clear(); return true; }