Deleted Added
sdiff udiff text old ( 10055:6153b582c9b5 ) new ( 11988:665cd5f8b52b )
full compact
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 14 unchanged lines hidden (view full) ---

23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * Authors: Nathan Binkert
29 */
30
31#include <iomanip>
32#include <iostream>
33#include <string>
34
35#include "base/cprintf.hh"
36#include "base/misc.hh"
37#include "base/statistics.hh"
38#include "base/types.hh"
39#include "sim/core.hh"
40#include "sim/stat_control.hh"
41
42// override the default main() code for this unittest
43const char *m5MainCommands[] = {
44 "import m5.stattestmain",
45 "m5.stattestmain.main()",
46 0 // sentinel is required
47};
48
49using namespace std;
50using namespace Stats;
51
52double testfunc();
53struct StatTest;
54StatTest & __stattest();
55void stattest_init();
56void stattest_run();
57
58
59double
60testfunc()
61{
62 return 9.8;
63}
64

--- 53 unchanged lines hidden (view full) ---

118StatTest &
119__stattest()
120{
121 static StatTest st;
122 return st;
123}
124
125void
126stattest_init()
127{
128 __stattest().init();
129}
130
131void
132stattest_run()
133{
134 __stattest().run();
135}
136
137void
138StatTest::init()
139{
140 EventQueue *q = getEventQueue(0);
141 curEventQueue(q);
142
143 cprintf("sizeof(Scalar) = %d\n", sizeof(Scalar));
144 cprintf("sizeof(Vector) = %d\n", sizeof(Vector));
145 cprintf("sizeof(Distribution) = %d\n", sizeof(Distribution));

--- 529 unchanged lines hidden (view full) ---

675 }
676
677 s19[0] = 1;
678 s19[1] = 100000;
679 s20[0] = 100000;
680 s20[1] = 1;
681
682}