Darmstadtium (Ds) is a library of data structures.
I know, I know--why reinvent the wheel all over again? Well, because frankly everyone else's wheels are garbage. These data structures impose minimally on your style, they're lightning fast, and they're easy to use however you want. Unlike most other libraries of data structures, these are actually decent.
For speed reasons, and because the code is pretty minuscule, it's implemented as (by default) inline functions.
Darmstadtium is composed of the following sub-modules, which all work more or less independently of each other:
#include-ing bohr/ds.h also #includes all sub-modules. If you only need one or two sub-modules, they're in their own headers, named the same as the module name, all lower case, with a .h suffix. This, for example, loads only Ds_hash:
#include-ing bohr/ds.h will also #include Po_sync.
For technical reasons, a file #include-ing bohr/ds.h must define _GNU_SOURCE, or _XOPEN_SOURCE to 500 or 600, before any headers are #included. This is most easily accomplished by adding -D_GNU_SOURCE or -D_XOPEN_SOURCE=500 (or -D_XOPEN_SOURCE=600) to the compiler command line. Note that Ds_queue is the only sub-module with this requirement, so if you don't include all of Darmstadtium, ignore this paragraph.
In Windows, only the standard Windows libraries are required.
In Unix, if you include all of Darmstadtium, you'll need to link with libpthread and librt (add -lpthread -lrt to GCC's command line). Note that Ds_queue is the only sub-module with this requirement, so if you don't include all of Darmstadtium you can adjust your linker flags accordingly.
Because Darmstadtium is (by default) inline C99 code, any code that includes any of Darmstadtium's headers must be compiled with a C99 compiler. If you use GCC, this means adding -std=gnu99 to your compile command line.
- Ds_INLINE: controls inlining and scope of functions