C++ version of github.com/ccs4ever/dimscape