Hi, I want to be able to perform matrix operations on several contiguous submatrices of a full matrix, without allocating the memory redundantly for the submatrices (in addition to the memory that is already allocated for the full matrix). I tried using MatGetSubMatrix, but this function appears to allocate the additional memory.
The other way I found to do this is to create the smallest submatrices I need first, then use MatCreateNest to combine them into bigger ones (including the full matrix). The documentation of MatCreateNest seems to indicate that it does not allocate additional memory for storing the new matrix. Is this the right approach, or is there a better one? Thanks, Michal Derezinski.
