]> www.ginac.de Git - ginac.git/blob - check/times.cpp
- cint/*: Revamped the launch-scheme for ginaccint.bin. It must be done
[ginac.git] / check / times.cpp
1 /** @file times.cpp
2  *
3  *  Main program that calls the individual timings. */
4
5 /*
6  *  GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program; if not, write to the Free Software
20  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
22
23 #include <stdexcept>
24 #include <iostream>
25
26 #include "times.h"
27
28 int main()
29 {
30     unsigned result = 0;
31     
32     try {
33         result += time_dennyfliegner();
34     } catch (const exception &e) {
35         cout << "Error: caught exception " << e.what() << endl;
36         ++result;
37     }
38     
39     try {
40         result += time_gammaseries();
41     } catch (const exception &e) {
42         cout << "Error: caught exception " << e.what() << endl;
43         ++result;
44     }
45     
46     try {
47         result += time_vandermonde();
48     } catch (const exception &e) {
49         cout << "Error: caught exception " << e.what() << endl;
50         ++result;
51     }
52     
53     try {
54         result += time_toeplitz();
55     } catch (const exception &e) {
56         cout << "Error: caught exception " << e.what() << endl;
57         ++result;
58     }
59     
60     try {
61         result += time_lw_A();
62     } catch (const exception &e) {
63         cout << "Error: caught exception " << e.what() << endl;
64         ++result;
65     }
66     
67     try {
68         result += time_lw_B();
69     } catch (const exception &e) {
70         cout << "Error: caught exception " << e.what() << endl;
71         ++result;
72     }
73     
74     try {
75         result += time_lw_C();
76     } catch (const exception &e) {
77         cout << "Error: caught exception " << e.what() << endl;
78         ++result;
79     }
80     
81     try {
82         result += time_lw_D();
83     } catch (const exception &e) {
84         cout << "Error: caught exception " << e.what() << endl;
85         ++result;
86     }
87     
88     try {
89         result += time_lw_E();
90     } catch (const exception &e) {
91         cout << "Error: caught exception " << e.what() << endl;
92         ++result;
93     }
94     
95     try {
96         result += time_lw_F();
97     } catch (const exception &e) {
98         cout << "Error: caught exception " << e.what() << endl;
99         ++result;
100     }
101     
102     try {
103         result += time_lw_G();
104     } catch (const exception &e) {
105         cout << "Error: caught exception " << e.what() << endl;
106         ++result;
107     }
108     
109     try {
110         result += time_lw_H();
111     } catch (const exception &e) {
112         cout << "Error: caught exception " << e.what() << endl;
113         ++result;
114     }
115     
116     try {
117         result += time_lw_IJKL();
118     } catch (const exception &e) {
119         cout << "Error: caught exception " << e.what() << endl;
120         ++result;
121     }
122     
123     try {
124         result += time_lw_M1();
125     } catch (const exception &e) {
126         cout << "Error: caught exception " << e.what() << endl;
127         ++result;
128     }
129     
130     try {
131         result += time_lw_O();
132     } catch (const exception &e) {
133         cout << "Error: caught exception " << e.what() << endl;
134         ++result;
135     }
136     
137     try {
138         result += time_lw_P();
139     } catch (const exception &e) {
140         cout << "Error: caught exception " << e.what() << endl;
141         ++result;
142     }
143     
144     try {
145         result += time_lw_Pprime();
146     } catch (const exception &e) {
147         cout << "Error: caught exception " << e.what() << endl;
148         ++result;
149     }
150     
151     try {
152         result += time_lw_Q();
153     } catch (const exception &e) {
154         cout << "Error: caught exception " << e.what() << endl;
155         ++result;
156     }
157     
158     try {
159         result += time_lw_Qprime();
160     } catch (const exception &e) {
161         cout << "Error: caught exception " << e.what() << endl;
162         ++result;
163     }
164     
165     if (result) {
166         cout << "Error: something went wrong. ";
167         if (result == 1) {
168             cout << "(one failure)" << endl;
169         } else {
170             cout << "(" << result << " individual failures)" << endl;
171         }
172         cout << "please check times.out against times.ref for more details."
173              << endl << "happy debugging!" << endl;
174     }
175     
176     return result;
177 }