Re: Who uses clapack?
From: Jentje Goslinga (goslinga_at_telus.net)
Date: 12/12/04
- Next message: Jentje Goslinga: "Re: Who uses clapack?notions to pastures."
- Previous message: Ron Shepard: "Re: Who uses clapack?"
- In reply to: Ron Shepard: "Re: Who uses clapack?"
- Next in thread: James Giles: "Re: Who uses clapack?"
- Reply: James Giles: "Re: Who uses clapack?"
- Reply: Mario S. Mommer: "Re: Who uses clapack?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 12 Dec 2004 18:07:07 GMT
Ron Shepard wrote:
> In article <slrncroaij.tik.romanNOSPAM@theta1.cft.edu.pl>,
> Roman Werpachowski <"r o m a nNOSPAM"@theta1.cft.edu.pl> wrote:
>
>
>>The only sensible way would be to have two functions: one which does the
>>allocation, another which does not. The problem is, that sometimes one
>>can flexibly choose a work space area, like in (D,S)SYEV routine. Small
>>workspace conserves memory but large workspace gives better convergence.
>>Which options should the self-allocating version of (D,S)SYEV choose?
>
>
> Modern Fortran
?
allows optional arguments, so the "sensible" way in
> that language would be to specify the workspace with an optional
> array. If specified during the call, then it is used, otherwise the
> subroutine allocates its own workspace. Of course, this puts
> additional burdens on other languages in cross-language projects to
> support the fortran calling conventions.
They already have to deal with the calling conventions, many
of which are not even defined by the Fortran language.
BTW, fortran also allows
> the call to use a generic name (e.g. call syev() in the above
> example), which is resolved to the specific precision based on the
> data types of its arguments, in order to eliminate the (D,S)
> portability problems when moving code between machines.
Hmmm.
> $.02 -Ron Shepard
I am sorry, but this advice is not worth two cents in my opinion.
Functions should be self-contained and allocate local storage.
If they really perform so little actual work that this is a
concern, then maybe the program is not structured optimally.
Variable arguments are another dubious language feature which
made its way into the C language because of the requirement of
the formatted print functions, but it causes problems.
Esoteric language "features" like variable arguments and "multiple
returns" should be avoided if at all possible.
Jentje Goslinga
- Next message: Jentje Goslinga: "Re: Who uses clapack?notions to pastures."
- Previous message: Ron Shepard: "Re: Who uses clapack?"
- In reply to: Ron Shepard: "Re: Who uses clapack?"
- Next in thread: James Giles: "Re: Who uses clapack?"
- Reply: James Giles: "Re: Who uses clapack?"
- Reply: Mario S. Mommer: "Re: Who uses clapack?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|