This example shows how to check the build mode of the ogdf and user programs.
As hinted at in this example the internal differentiation between Debug and Release build mode in the OGDF is handled via the preprocessor macro OGDF_DEBUG
. Also, any compiled instance of the ogdf will expose the build mode it was compiled in via the flag ogdf::debugMode. This allows users to make sure the build configuration of their user code matches that of the ogdf library.
This example shows how to query information about the system.
The ogdf::System interface enables you to query information about the system at runtime, including CPU thread count, cache sizes and supported technologies as well as some basic statistics about memory usage on the system. While most of this should probably not concern the average user, it might still be useful to know for more experienced users that by default the ogdf comes with and uses its own memory manager ogdf::PoolMemoryAllocator which will allocate memory in chunks for better runtime at the cost of some (minor) memory overhead. To compile with standard free/malloc memory management using ogdf::MallocMemoryAllocator you can define the preprocessor macro OGDF_MEMORY_MALLOC_TS
via cmake. Note also that all ogdf algorithms will run sequentially unless multithreading is explicitly requested.