dmm: use C++ mex instead of Fortran