File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 6
6
#include < map>
7
7
#include < vector>
8
8
#include < coek/util/tictoc.hpp>
9
+ #include " ../coek/ast/value_terms.hpp"
10
+ #include " ../coek/ast/constraint_terms.hpp"
9
11
10
12
const std::string currdir = COEK_TEST_DIR;
11
13
12
14
int main (int argc, char ** argv)
13
15
{
14
16
if (argc == 1 ) {
15
17
std::cout << " coek_micro_test <n>" << std::endl;
18
+ std::cout << " 0 - benchmark loops" << std::endl;
19
+ std::cout << " 1 - benchmark var initialization" << std::endl;
20
+ std::cout << " 2 - coek object sizes" << std::endl;
16
21
return 0 ;
17
22
}
18
23
@@ -91,5 +96,22 @@ int main(int argc, char** argv)
91
96
#endif
92
97
}
93
98
99
+ else if (n == 2 ) {
100
+ coek::Parameter p;
101
+ std::cout << " sizeof Parameter=" << sizeof (coek::Parameter) << " repn=" << sizeof (p.repn ) << " ParameterTerm=" << sizeof (coek::ParameterTerm) << std::endl;
102
+
103
+ coek::IndexParameter ip;
104
+ std::cout << " sizeof IndexParameter=" << sizeof (coek::IndexParameter) << " repn=" << sizeof (ip.repn ) << " IndexParameterTerm=" << sizeof (coek::IndexParameterTerm) << std::endl;
105
+
106
+ coek::Variable v;
107
+ std::cout << " sizeof Variable=" << sizeof (coek::Variable) << " repn=" << sizeof (v.repn ) << " VariableTerm=" << sizeof (coek::VariableTerm) << std::endl;
108
+
109
+ coek::Objective o;
110
+ std::cout << " sizeof Objective=" << sizeof (coek::Objective) << " repn=" << sizeof (o.repn ) << " ObjectiveTerm=" << sizeof (coek::ObjectiveTerm) << std::endl;
111
+
112
+ coek::Constraint c;
113
+ std::cout << " sizeof Constraint=" << sizeof (coek::Constraint) << " repn=" << sizeof (c.repn ) << " ConstraintTerm=" << sizeof (coek::ConstraintTerm) << std::endl;
114
+ }
115
+
94
116
return 0 ;
95
117
}
You can’t perform that action at this time.
0 commit comments