File: sizes.cpp

package info (click to toggle)
regina-normal 7.4.1-1.1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 154,244 kB
  • sloc: cpp: 295,026; xml: 9,992; sh: 1,344; python: 1,225; perl: 616; ansic: 138; makefile: 26
file content (141 lines) | stat: -rw-r--r-- 4,222 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
// The point of this program is simply to see how large some of our data
// structures are, to help decide when to implement move semantics, and
// when it is reasonable to keep things on the stack vs allocate on the heap.

#include <iostream>

#include "link/link.h"
#include "link/tangle.h"

#include "manifold/graphloop.h"
#include "manifold/graphpair.h"
#include "manifold/graphtriple.h"
#include "manifold/handlebody.h"
#include "manifold/lensspace.h"
#include "manifold/sfs.h"
#include "manifold/simplesurfacebundle.h"
#include "manifold/snappeacensusmfd.h"
#include "manifold/torusbundle.h"

#include "subcomplex/augtrisolidtorus.h"
#include "subcomplex/blockedsfs.h"
#include "subcomplex/blockedsfsloop.h"
#include "subcomplex/blockedsfspair.h"
#include "subcomplex/blockedsfstriple.h"
#include "subcomplex/layeredchain.h"
#include "subcomplex/layeredchainpair.h"
#include "subcomplex/layeredlensspace.h"
#include "subcomplex/layeredloop.h"
#include "subcomplex/layeredsolidtorus.h"
#include "subcomplex/layeredtorusbundle.h"
#include "subcomplex/layering.h"
#include "subcomplex/pillowtwosphere.h"
#include "subcomplex/pluggedtorusbundle.h"
#include "subcomplex/plugtrisolidtorus.h"
#include "subcomplex/satregion.h"
#include "subcomplex/snappeacensustri.h"
#include "subcomplex/snappedball.h"
#include "subcomplex/snappedtwosphere.h"
#include "subcomplex/spiralsolidtorus.h"
#include "subcomplex/trisolidtorus.h"
#include "subcomplex/trivialtri.h"

#include "angle/anglestructures.h"
#include "hypersurface/normalhypersurfaces.h"
#include "surface/normalsurfaces.h"

#include "triangulation/dim2.h"
#include "triangulation/dim3.h"
#include "triangulation/dim4.h"
#include "triangulation/generic.h"
#include "triangulation/dim3/homologicaldata.h"

#define SHOW_SIZE(T) std::cout << #T << ": " \
    << sizeof(T) << " byte(s)" << std::endl;

using namespace regina;

int main() {
    std::cout << "Algebra:" << std::endl;
    SHOW_SIZE(AbelianGroup);
    SHOW_SIZE(GroupPresentation);
    SHOW_SIZE(HomGroupPresentation);
    SHOW_SIZE(MarkedAbelianGroup);
    std::cout << std::endl;

    std::cout << "Manifolds:" << std::endl;
    SHOW_SIZE(GraphLoop);
    SHOW_SIZE(GraphPair);
    SHOW_SIZE(GraphTriple);
    SHOW_SIZE(Handlebody);
    SHOW_SIZE(LensSpace);
    SHOW_SIZE(SFSpace);
    SHOW_SIZE(SimpleSurfaceBundle);
    SHOW_SIZE(SnapPeaCensusManifold);
    SHOW_SIZE(TorusBundle);
    std::cout << std::endl;

    std::cout << "Mathematical Support:" << std::endl;
    SHOW_SIZE(Integer);
    SHOW_SIZE(LargeInteger);
    SHOW_SIZE(Matrix2);
    SHOW_SIZE(MatrixInt);
    SHOW_SIZE(VectorInt);
    SHOW_SIZE(Perm<2>);
    SHOW_SIZE(Perm<3>);
    SHOW_SIZE(Perm<4>);
    SHOW_SIZE(Perm<5>);
    SHOW_SIZE(Perm<6>);
    SHOW_SIZE(Perm<7>);
    std::cout << std::endl;

    std::cout << "Standard Triangulations:" << std::endl;
    SHOW_SIZE(AugTriSolidTorus);
    SHOW_SIZE(BlockedSFS);
    SHOW_SIZE(BlockedSFSLoop);
    SHOW_SIZE(BlockedSFSPair);
    SHOW_SIZE(BlockedSFSTriple);
    SHOW_SIZE(LayeredChain);
    SHOW_SIZE(LayeredChainPair);
    SHOW_SIZE(LayeredLensSpace);
    SHOW_SIZE(LayeredLoop);
    SHOW_SIZE(LayeredSolidTorus);
    SHOW_SIZE(LayeredTorusBundle);
    SHOW_SIZE(Layering);
    SHOW_SIZE(PillowTwoSphere);
    SHOW_SIZE(PluggedTorusBundle);
    SHOW_SIZE(PlugTriSolidTorus);
    SHOW_SIZE(SatRegion);
    SHOW_SIZE(SnapPeaCensusTri);
    SHOW_SIZE(SnappedBall);
    SHOW_SIZE(SnappedTwoSphere);
    SHOW_SIZE(SpiralSolidTorus);
    SHOW_SIZE(TriSolidTorus);
    SHOW_SIZE(TrivialTri);
    std::cout << std::endl;

    std::cout << "Packets:" << std::endl;
    SHOW_SIZE(Packet);
    SHOW_SIZE(Link);
    SHOW_SIZE(Triangulation<2>);
    SHOW_SIZE(Triangulation<3>);
    SHOW_SIZE(Triangulation<4>);
    SHOW_SIZE(Triangulation<5>);
    std::cout << std::endl;

    std::cout << "Surfaces and Structures:" << std::endl;
    SHOW_SIZE(AngleStructure);
    SHOW_SIZE(NormalHypersurface);
    SHOW_SIZE(NormalSurface);
    SHOW_SIZE(AngleStructures);
    SHOW_SIZE(NormalHypersurfaces);
    SHOW_SIZE(NormalSurfaces);
    std::cout << std::endl;

    std::cout << "Other:" << std::endl;
    SHOW_SIZE(HomologicalData);
    SHOW_SIZE(Tangle);
    std::cout << std::endl;

    return 0;
}