Debian Codegraph @

Source/Control/Loader/CTestMemoryAccessLoader.h

raw
1 /*
2 * Copyright (C) 2013-2015, 2019 by the Konclude Developer Team.
3 *
4 * This file is part of the reasoning system Konclude.
5 * For details and support, see <http://konclude.com/>.
6 *
7 * Konclude is free software: you can redistribute it and/or modify
8 * it under the terms of version 3 of the GNU Lesser General Public
9 * License (LGPLv3) as published by the Free Software Foundation.
10 *
11 * Konclude is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU (Lesser) General Public License for more details.
15 *
16 * You should have received a copy of the GNU (Lesser) General Public
17 * License along with Konclude. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 #ifndef KONCLUDE_Control_LOADER_CTestMemoryAccessLoader_H
22 #define KONCLUDE_Control_LOADER_CTestMemoryAccessLoader_H
23
24 // Libraries includes
25 #include <QString>
26 #include <QRegExp>
27
28 // Namespace includes
29 #include "CLoader.h"
30
31 // Other includes
32 #include "Test/CConcurrentMemoryAccessTester.h"
33
34 #include "Concurrent/CIntervalThread.h"
35
36 // Logger includes
37 #include "Logger/CLogger.h"
38
39
40
41 namespace Konclude {
42
43 using namespace Logger;
44 using namespace Test;
45 using namespace Concurrent;
46
47 namespace Control {
48
49 namespace Loader {
50
51 /*!
52 *
53 * \class CTestMemoryAccessLoader
54 * \author Andreas Steigmiller
55 * \version 0.1
56 * \brief TODO
57 *
58 */
59 class CTestMemoryAccessLoader : public CIntervalThread, public CLoader {
60 // public methods
61 public:
62 //! Constructor
63 CTestMemoryAccessLoader();
64
65 //! Destructor
66 virtual ~CTestMemoryAccessLoader();
67
68
69 virtual CLoader* init(CLoaderFactory* loaderFactory = 0, CConfiguration* config = 0);
70 virtual CLoader* load();
71 virtual CLoader* exit();
72
73
74 // protected methods
75 protected:
76 virtual bool processTimer(qint64 timerID);
77
78 // protected variables
79 protected:
80 cint64 mRemainingSteps;
81 cint64 mSwitchRemainingSteps;
82 CConfiguration* mConfiguration;
83
84 cint64 mThreadCount;
85 cint64 mMaxThreadCount;
86
87 cint64 mReadWriteRatio;
88 cint64 mReadWriteRatioStepMultiplier;
89 cint64 mReadWriteRatioMax;
90 cint64 mReadWriteRatioInit;
91 cint64 mArraySize;
92 cint64 mArraySizeStepMultiplier;
93 cint64 mArraySizeMax;
94 cint64 mArraySizeInit;
95
96 bool mAtomicOperations;
97
98 cint64 mOneThreadScore;
99
100
101 CConcurrentMemoryAccessTester* tester;
102
103 static const cint64 TESTTIMERID = 1;
104
105 // private methods
106 private:
107
108 // private variables
109 private:
110
111 };
112
113 }; // end namespace Loader
114
115 }; // end namespace Control
116
117 }; // end namespace Konclude
118
119 #endif // KONCLUDE_Control_LOADER_CTestMemoryAccessLoader_H