Why dgglse_ doesn't support multi-column matrix on its right hand side,like dgels_

for example:for the equation Ax=BIn dgels_, B could be of multi-column, so A just needs to be factorized only onceBut in dgglse_, if I want to solve the following problem:1 minimize || c1 - A*x ||_2 subject to B*x = d1 2 minimize || c2- A*x ||_2 subject to B*x = d23 minimize || c3- A*x ||_2 subject to B*x = d3...I could only solve them one by one, in this case,the same (A,B) must be factorized multiple times, which wastes a lot of time.Could anyone give a better solution pls?Or what's the rational of dgglse_ comparing to dgels_ ?Thanks!

DGGLSE supports only "one c" and "one d". Since most of the work is in the factorization of the matrices, you are perfectly right that if you have "several c" and "several d", then the interface is not optimal at all. I can put your request on the wish list of LAPACK functionality. It makes complete sense to have the functionality if someone wants it. (The converse is true as well: It would not have made much sense to have the functionality if nobody wants it ... ) Can you send a brief description of your application and why you need this functionality please?

It should be fairly easy to "hack" DGGLSE so that it supports K couples (c,d). I believe all you need to do is to insert a DO loop from line 196 to line 260 of DGGLSE, where the code would loop on each couple (c,d) one at a time. That would be the first step. The second step would be to group the LAPACK function calls so that they handle all the couple (c,d) at once. For example, the first call to DORMQR line 200. You can call K times DORMQR( 'L', 'T', M, 1, MN, ... ) -- this is what you would do with the DO loop -- or you call it once with DORMQR( 'L', 'T', M, K, MN, ... ). Them the same for DTRTRS line 207. Instead of calling K times DTRTRS( 'U', 'N', 'N', P, 1, ...), one would call once DTRTRS( 'U', 'N', 'N', P, K, ... ). Etc.

Congratulations. You have been added to the LAPACK wishlist. See: http://www.netlib.org/lapack/WishList/.Feel free to provide insight on why the functionality would be useful to you or to others. (Application, etc.)

Hi JulienThanks for ur help and detailed explanation!However, I believe that most users of LAPACK are intereseted in how to "use" the library instead of how to "maintain" or "develop" it, so could u pls attach the modified version (both the .h and .c files) here directly such that we don't need to spend time on going through the code?