23 os <<
"DDD in memory stats:" << std::endl <<
"====================" << std::endl << std::endl;
34 int noLog(0), noSol(0), noMat(0), noRot(0);
37 int noCLog(0), noCSol(0), noCMat(0), noCRot(0);
42 const auto&
g = cpv.
graph();
50 for (; it !=
g.end(); ++it) {
52 noEdges += it->size();
57 lpst_type::iterator lpstit = lpst.begin();
58 for (; lpstit != lpst.end(); ++lpstit) {
59 noCLog += lpstit->first.name().size();
65 mast_type::iterator mastit = mast.begin();
66 for (; mastit != mast.end(); ++mastit) {
67 noCMat += mastit->first.name().size();
73 sost_type::iterator sostit = sost.begin();
74 for (; sostit != sost.end(); ++sostit) {
75 noCSol += sostit->first.name().size();
77 noSolidP +=
s.parameters().size();
83 rost_type::iterator rostit = rost.begin();
84 for (; rostit != rost.end(); ++rostit) {
85 noCRot += rostit->first.name().size();
90 std::cout <<
"sizeof(void*)=" <<
sizeof(
void*) << std::endl;
94 int store = 4 *
sizeof(
void*);
96 int bySol = noSolidP *
sizeof(double) + noSol * store;
97 int byMat = noMat * (5 *
sizeof(double) + store);
99 int byNam = noCLog + noCSol + noCMat + noCRot;
101 int byGra = (noEdges + noNodes) * store;
102 int bytes = byRot + bySol + byMat + byPos + byNam + byLog + byGra;
104 double mb = 1024. * 1024.;
106 os <<
"noNodes=" << noNodes << std::endl
107 <<
"noEdges=" << noEdges << std::endl
108 <<
"noExNod=" << noExpNodes << std::endl
110 os <<
"noLog=" << noLog << std::endl
111 <<
"noSol=" << noSol <<
" noSolidP=" << noSolidP << std::endl
112 <<
"noMat=" << noMat << std::endl
113 <<
"noRot=" << noRot << std::endl
115 os <<
"noCLog=" << noCLog << std::endl
116 <<
"noCSol=" << noCSol << std::endl
117 <<
"noCMat=" << noCMat << std::endl
118 <<
"noCRot=" << noCRot << std::endl
119 <<
" --------" << std::endl
120 <<
" " << byNam <<
" chars used for naming." << std::endl
122 os <<
"byLog = " << byLog / mb <<
" logicalparts " << std::endl
123 <<
"byNam = " << byNam / mb <<
" string for names " << std::endl
124 <<
"byRot = " << byRot / mb <<
" rotations " << std::endl
125 <<
"bySol = " << bySol / mb <<
" solids " << std::endl
126 <<
"byMat = " << byMat / mb <<
" materials " << std::endl
127 <<
"byPos = " << byPos / mb <<
" posparts " << std::endl
128 <<
"byGra = " << byGra / mb <<
" graph-struct " << std::endl
129 <<
"-----------------------" << std::endl
130 <<
"OVERALL: " << bytes / mb <<
" MByte" << std::endl;