You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/*! \page common Common Utilities and Helpers found in STXXL
14
15
15
-
A lots of basic utility classes and helper functions have accumulated in
16
-
STXXL. Try are usually fundamental enough to be also used in an application
17
-
program. Before implementing a common software utility, please check the list
18
-
below; it might already exist in STXXL:
16
+
A lots of basic utility classes and helper functions have accumulated in STXXL. Try are usually fundamental enough to be also used in an application program. Before implementing a common software utility, please check the list below; it might already exist in STXXL:
19
17
20
18
- \subpage common_random "random number generators"
21
19
- \subpage common_timer "timestamp and timer function"
@@ -47,35 +45,25 @@ TODO-df
47
45
48
46
/*! \page common_simple_vector A Non-growing, Non-initializing Simpler Vector
49
47
50
-
For applications where a std::vector is overkill, or one wishes to allocate an
51
-
uninitialied POD array, the stxxl::simple_vector is a good method.
48
+
For applications where a std::vector is overkill, or one wishes to allocate an uninitialied POD array, the stxxl::simple_vector is a good method.
Some objects in STXXL are reference counted. This is usually done for large
58
-
objects, which should not be copied deeply in assignments. Instead, a reference
59
-
counting pointer is used, which holds a handle while the pointer exists and
60
-
deletes the object once all pointers go out of scope. Examples are matrices and
61
-
sorted_runs.
54
+
Some objects in STXXL are reference counted. This is usually done for large objects, which should not be copied deeply in assignments. Instead, a reference counting pointer is used, which holds a handle while the pointer exists and deletes the object once all pointers go out of scope. Examples are matrices and sorted_runs.
62
55
63
-
The method used is called stxxl::counting_ptr or intrusive reference counting.
64
-
This is similar, but not identical to boost or TR1's shared_ptr.
56
+
The method used is called stxxl::counting_ptr or intrusive reference counting. This is similar, but not identical to boost or TR1's shared_ptr.
65
57
66
-
The stxxl::counting_ptr is accompanied by stxxl::counted_object, which contains
67
-
the actual reference counter (a single integer). A reference counted object
68
-
must derive from stxxl::counted_object:
58
+
The stxxl::counting_ptr is accompanied by stxxl::counted_object, which contains the actual reference counter (a single integer). A reference counted object must derive from stxxl::counted_object:
69
59
70
60
\code
71
61
struct something : public stxxl::counted_object
72
62
{
73
63
};
74
64
\endcode
75
65
76
-
Code that now wishes to use pointers referencing this object, will typedef an
77
-
stxxl::counting_ptr, which is used to increment and decrement the included
78
-
reference counter automatically.
66
+
Code that now wishes to use pointers referencing this object, will typedef an stxxl::counting_ptr, which is used to increment and decrement the included reference counter automatically.
The stxxl::counting_ptr can generally be used like a usual pointer or
95
-
shared_ptr (see the docs for more).
82
+
The stxxl::counting_ptr can generally be used like a usual pointer or shared_ptr (see the docs for more).
96
83
97
-
There is also stxxl::const_counting_ptr to return const objects (note that a
98
-
const stxxl::counting_ptr will only render the pointer const, not the enclosed
99
-
object).
84
+
There is also stxxl::const_counting_ptr to return const objects (note that a const stxxl::counting_ptr will only render the pointer const, not the enclosed object).
100
85
101
86
*/
102
87
103
88
/*! \page common_thread_sync Synchronization Primitives for Multi-Threading
104
89
105
-
To support multi-threading, some parts of STXXL use synchronization primitives
106
-
to ensure correct results. The primitives are based either on pthreads or on
107
-
Boost classes.
90
+
To support multi-threading, some parts of STXXL use synchronization primitives to ensure correct results. The primitives are based either on pthreads or on Boost classes.
108
91
109
92
\section mutex Mutexes
110
93
111
-
For simple mutual exclusion contexts, stxxl::mutex objects should be used
112
-
together with scoped locks:
94
+
For simple mutual exclusion contexts, stxxl::mutex objects should be used together with scoped locks:
113
95
114
96
\code
115
97
class Something
@@ -137,8 +119,7 @@ stxxl::onoff_switch is a two state semaphore thing?
137
119
138
120
/*! \page common_logging Logging Macros STXXL_MSG
139
121
140
-
All STXXL components should output log or trace messages using the following
141
-
macros. There are two basic methods for logging using ostream syntax:
122
+
All STXXL components should output log or trace messages using the following macros. There are two basic methods for logging using ostream syntax:
\section unittest Assertions in Unit Tests: STXXL_CHECK
186
165
187
-
Assertions in unit tests must use the following macros to ensure that the
188
-
condition is also checked in release builds (where a plain \c "assert()" is
189
-
void). These \c CHECK function should NOT be used to test return values, since
190
-
we try to throw exceptions instead of aborting the program.
166
+
Assertions in unit tests must use the following macros to ensure that the condition is also checked in release builds (where a plain \c "assert()" is void). These \c CHECK function should NOT be used to test return values, since we try to throw exceptions instead of aborting the program.
191
167
192
168
\code
193
169
// test a condition
@@ -196,19 +172,13 @@ STXXL_CHECK( 2+2 == 4 );
196
172
STXXL_CHECK2( 2+2 == 4, "We cannot count!");
197
173
\endcode
198
174
199
-
Sometimes one also wants to check that a specific expression \b throws an
200
-
exception. This checking can be done automatically using a <tt>try { } catch
201
-
{}</tt> by using STXXL_CHECK_THROW.
175
+
Sometimes one also wants to check that a specific expression \b throws an exception. This checking can be done automatically using a <tt>try { } catch {}</tt> by using STXXL_CHECK_THROW.
202
176
203
177
\section plain Plain Assertions: assert
204
178
205
-
For the usual assertions, that should be removed in production code for
206
-
performance, we use the standard \c "assert()" function.
179
+
For the usual assertions, that should be removed in production code for performance, we use the standard \c "assert()" function.
207
180
208
-
However, there is also \c STXXL_ASSERT(), which can be used as a replacement
209
-
for \c assert(), when compiler warnings about unused variables or typedefs
210
-
occur. The issue is that assert() completely removes the code, whereas
211
-
STXXL_ASSERT() keeps the code encloses it inside \c if(0).
181
+
However, there is also \c STXXL_ASSERT(), which can be used as a replacement for \c assert(), when compiler warnings about unused variables or typedefs occur. The issue is that assert() completely removes the code, whereas STXXL_ASSERT() keeps the code encloses it inside \c if(0).
212
182
213
183
TODO: STXXL_THROW
214
184
@@ -236,14 +206,11 @@ See the file common/uint_types.h
236
206
237
207
\section namespaces __STXXL_BEGIN_NAMESPACE
238
208
239
-
A long, long time ago, not all compilers supported C++ namespaces, thus STXXL
240
-
uses the macros __STXXL_BEGIN_NAMESPACE and __STXXL_END_NAMESPACE, which open
241
-
and close the \c "namespace stxxl".
209
+
A long, long time ago, not all compilers supported C++ namespaces, thus STXXL uses the macros __STXXL_BEGIN_NAMESPACE and __STXXL_END_NAMESPACE, which open and close the \c "namespace stxxl".
242
210
243
211
\section unused STXXL_UNUSED
244
212
245
-
STXXL_UNUSED is not actually a macro. It is a remedy against "unused variable"
246
-
warnings, for whatever reason. Usage:
213
+
STXXL_UNUSED is not actually a macro. It is a remedy against "unused variable" warnings, for whatever reason. Usage:
247
214
248
215
\code
249
216
void function(int x)
@@ -254,9 +221,7 @@ void function(int x)
254
221
255
222
\section likely LIKELY and UNLIKEY
256
223
257
-
Some compilers have facilities to specify whether a condition is likely or
258
-
unlikely to be true. This may have consequences on how to layout the assembler
259
-
code better.
224
+
Some compilers have facilities to specify whether a condition is likely or unlikely to be true. This may have consequences on how to layout the assembler code better.
260
225
261
226
\code
262
227
if (LIKELY(x > 1)) { ... }
@@ -265,8 +230,6 @@ if (UNLIKELY(x > 8)) { ... }
265
230
266
231
\section deprecated Deprecated Functions
267
232
268
-
Some compilers can warn the user about deprecated function by tagging them in
269
-
the source. In STXXL we use the macro _STXXL_DEPRECATED(...) to enclose
270
-
deprecated functions.
233
+
Some compilers can warn the user about deprecated function by tagging them in the source. In STXXL we use the macro _STXXL_DEPRECATED(...) to enclose deprecated functions.
Copy file name to clipboardexpand all lines: doc/design.dox
+5-7
Original file line number
Diff line number
Diff line change
@@ -126,13 +126,11 @@ The documentation of \subpage design_stl "The STL-User Layer" is on a separate s
126
126
127
127
# The Algorithm Pipelining Layer
128
128
129
-
The \subpage design_pipeline "Streaming layer" provides efficient support for
130
-
external memory algorithms with mostly \b sequential I/O pattern, i.e. scan,
131
-
sort, merge, etc. A user algorithm, implemented using this module can save many
132
-
I/Os. The win is due to an efficient interface, that couples the input and the
133
-
output of the algorithms-components (scans, sorts, etc.). The output from an
134
-
algorithm is directly fed into another algorithm as the input, without the need
135
-
to store it on the disk.
129
+
The \subpage design_pipeline "Streaming layer" provides efficient support for external memory algorithms with mostly \b sequential I/O pattern, i.e. scan, sort, merge, etc. A user algorithm, implemented using this module can save many I/Os. The win is due to an efficient interface, that couples the input and the output of the algorithms-components (scans, sorts, etc.). The output from an algorithm is directly fed into another algorithm as the input, without the need to store it on the disk.
130
+
131
+
# Common Helpers and Utilities
132
+
133
+
Beyond the layered library, STXXL contains many small helpers commonly used in C++ like random numbers or shared pointers. See \subpage common "the common library" for short descriptions.
The core of STXXL is an implementation of the C++ standard template library STL for <b>external memory</b> (out-of-core) computations, i.e., STXXL implements containers and algorithms that can process huge volumes of data that only fit on disks. While the compatibility to the STL supports ease of use and compatibility with existing applications, another design priority is high performance. Here is a selection of STXXL performance features:
19
19
@@ -24,23 +24,19 @@ The core of STXXL is an implementation of the C++ standard template library STL
24
24
- algorithm pipelining
25
25
- utilization of multiple processor cores for internal computation
26
26
27
-
See the \subpage introduction "introduction and design" page for a longer mission statement.
27
+
See the \subpage introduction "introduction to external memory" for a longer description and our vision.
28
28
29
-
\section getting_started Getting Started
29
+
# Getting Started: Building and Tutorial
30
30
31
31
This section will help you if you are using the STXXL for the first time.
32
32
33
-
\subpage install_unix
33
+
First you must compile the library. Pick one of the following instructions, depending on your host system:
34
34
35
-
\link install-windows Compiling and Installing the STXXL on Microsoft Windows \endlink
35
+
- \subpage install_unix
36
36
37
-
\link install-macos Compiling Installing the STXXL on Mac OS \endlink
37
+
- \link install-windows Compiling and Installing the STXXL on Microsoft Windows \endlink
38
38
39
-
\subpage design "Design of STXXL concepts, containers and algorithms"
40
-
41
-
\section usage_functionality Usage and Functionality
42
-
43
-
This section provides simple and detailed documented examples on STXXL's datastructures.
39
+
Once compiled, you can read the following simple tutorial on how to use STXXL containers and algorithms:
- \link install-svn Installing from subversion \endlink
55
+
We have collected much documentation about the design of STXXL. Even more information is available as academic research papers, technical reports and theses.
63
56
57
+
- \subpage design "Design of STXXL concepts, containers and algorithms"
64
58
65
-
\section questions Questions
59
+
# Questions
66
60
67
61
- Questions concerning use and development of the STXXL library should be posted to the <b><a href="http://sourceforge.net/projects/stxxl/forums">FORUMS</a></b>. Please search the forum before posting, your question may have been answered before.
68
62
69
-
\section bugreports Bug Reports
63
+
# Bug Reports and FAQ
70
64
71
-
- Bugs should be reported in the <b><a href="https://stxxl.ae.cs.uni-frankfurt.de/bugs/">Bugzilla Bug Tracker</a></b>
- Bugs should be reported in the <b><a href="https://stxxl.ae.cs.uni-frankfurt.de/bugs/">Bugzilla Bug Tracker</a></b>
75
68
76
-
\section license License
69
+
# License
77
70
78
71
\c STXXL is distributed under the Boost Software License, Version 1.0.<br> You can find a copy of the license in the accompanying file \c LICENSE_1_0.txt or online at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>.
0 commit comments