Reorder dmatrix in decoder.