This investigation aims to evaluate the use of space filling curves as an alternative method of underlying storage for MDEventWorkspaces within Mantid. Currently this is done using a recursive box structure already described here.
In the space filling curve approach all events are stored in a single container which is sorted in the order of the individual events position on the curve.
This can be done via a conversion of floating point coordinates to interleaved integers (aka Morton number) then sorting the container using this number as the sorting key. The result of this is the event list sorted in Z-order.
The box structure can then be recreated from the sorted event list. Each MDBox
would contain iterators to the start and end of the events that were contained
within it in the container of all events.
Building requires GCC 5 or greater, CMake, Conan. Linux is the only tested OS.
mkdir build
cd build
conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
conan remote add ess-dmsc https://api.bintray.com/conan/ess-dmsc/conan
conan install /path/to/src/dir/conanfile.txt -s build_type=[Release/Debug] -s compiler.libcxx=libstdc++11 --build missing
cmake /path/to/src/dir -DCMAKE_BUILD_TYPE=[Release/Debug]
make
To run unit tests:
ctest -L UnitTest
To run benchmarks (that are not dependant on data files):
ctest -V -L Benchmark -LE Data