MintPack is a portable collection of data structures and modules.
To use MintPack in your project, add the top-level
include/ folder to your include paths, and compile and link with a lib build from the source in the
src/mintpack/ folder. There’s a
CMakeLists.txt located there, so you can use CMake to generate this lib for you. See the test suite for some examples of how it’s used.
A lightweight logging system, identical to the one described in this blog post, but made portable using Mintomic.
Pseudorandom Number Generator
Random, a self-seeding pseudorandom number generator with excellent pseudorandom distribution. It passes all 144 tests in TestU01’s Crush suite. Unlike
rand, it returns values that are uniformly distributed in the complete range of 32-bit integers. Unlike many pseudorandom number generators, you don’t have to seed it, yet two instances of
Random are extremely unlikely to generate the same sequence. It uses MintSystem services to help accomplish this.
Random::generate32 generates a pseudorandom
Random::generateUnique32 is guaranteed to return a unique value for up to 4,294,967,296 calls, at which point it loops. Not thread-safe.
Spawns two or more threads using the same entry point function, and as much as possible, tries to kick them off simultaneously, ideally on different CPU cores.
CPU Time Waster
Performs tiny, random amounts of busy work on the CPU. Suitable for the experiment described in this blog post.