Go to the documentation of this file.00001 #include <itpp/itbase.h>
00002
00003 using namespace itpp;
00004
00005
00006 using std::cout;
00007 using std::endl;
00008
00009 int main()
00010 {
00011
00012 long i, sum, N;
00013
00014
00015 Real_Timer tt;
00016
00017
00018 N = 1000000;
00019 sum = 0;
00020
00021
00022 tt.tic();
00023
00024
00025 for (i=0; i<N; i++) {
00026 sum += i;
00027 }
00028
00029
00030 tt.toc_print();
00031
00032
00033 cout << "The sum of all integers from 0 to " << N-1 << " equals " << sum << endl;
00034
00035
00036 return 0;
00037
00038 }