Merge from opengm/opengm