Example #1
0
void do_something(const tCsa &csa){
	stop_watch sw;
	uint64_t sum=0;
	sw.start();
	for(size_t i=0; i<csa.size() and i<10000000;++i){
		sum+=csa.psi(i);
	}
	sw.stop();
	cout << sw.get_real_time() << endl;
	cout<<"sum="<<sum<<endl;
}
Example #2
0
void do_something(const tCsa& csa)
{
    uint64_t sum=0;
    auto start = timer::now();
    for (size_t i=0; i<csa.size() and i<10000000; ++i) {
        sum+=csa.psi(i);
    }
    auto stop = timer::now();
    cout << duration_cast<microseconds>(stop-start).count() << endl;
    cout <<"sum="<<sum<<endl;
}