From bug-request at octave dot org Fri Mar 11 20:26:07 2005 Subject: Re: A'*b runs out of memory From: spasmous To: bug-octave at octave dot org Date: Fri, 11 Mar 2005 18:36:23 -0600 --0-1833177741-1110588193=:39011 Content-Type: text/plain; charset=us-ascii There is of course the kludge (b'*A)' which performs a lot better than A'*b although compromises readability. "John W. Eaton" wrote: On 11-Mar-2005, spasmous wrote: | A = rand(5000); | b = rand(5000,1); | | tic;x = A * b;toc | ans = 0.273 | | tic;x = A' * b;toc | error: memory exhausted | | I think LAPACK accepts flags for transpose multiply so A' * b should not have to form A' (and consequently run out memory or run slow). Yes. In the past, we've discussed the possiblity of having the transpose operator simply set a flag (or equivalent) saying that the matrix is transposed, but it seemed that it was not worth the extra complexity. jwe --------------------------------- Do you Yahoo!? Yahoo! Small Business - Try our new resources site! --0-1833177741-1110588193=:39011 Content-Type: text/html; charset=us-ascii
There is of course the kludge (b'*A)' which performs a lot better than A'*b although compromises readability.
 
 
 
 
 
"John W. Eaton" <jwe at bevo dot che dot wisc dot edu> wrote:

On 11-Mar-2005, spasmous wrote:

| A = rand(5000);
| b = rand(5000,1);
|
| tic;x = A * b;toc
| ans = 0 dot 273
|
| tic;x = A' * b;toc
| error: memory exhausted
|
>wrote:

| A = rand(5000);
| b = rand(5000,1);
|
| tic;x = A * b;toc
| ans = 0.273
|
| tic;x = A' * b;toc
| error: memory exhausted
|
| I think LAPACK accepts flags for transpose multiply so A' * b should not have to form A' (and consequently run out memory or run slow).

Yes. In the past, we've discussed the possiblity of having the
transpose operator simply set a flag (or equivalent) saying that the
matrix is transposed, but it seemed that it was not worth the extra
complexity.

jwe


Do you Yahoo!?
Yahoo! Small Business - Try our new resources site! --0-1833177741-1110588193=:39011-- ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------