@karlnapf ahh.. I remember you pointed this last time as well and we had some discussion! :)
The point here is that because of the problem with in-place thing, its not convenient to use () operator (```m(row,col)``` points to ```m.matrix[col*num_features+row]``` not ```m.matrix[col*num_dim+row]```). Plus element by element copying is also necessary because I am accessing spread out elements in the matrix array and stacking them to the left side of the same array. I can't access them in blocks.