[log in to unmask] wrote:
>
> In a message dated 10/17/00 7:50:53 AM, [log in to unmask] writes:
>
> >
> >character(*), optional :: most
> > 'SMALLEST' : the smallest representation in memory (default)
> > 'FASTEST' : the fastest floating point operations on this machine
> >
> Note that this can be ambiguous. It is not unknown for, say, a double
> precision variable in a register to be faster than a real in a register
> (e.g., the machine may do all operations in double precision so the real has
> the extra overhead of conversion to and from double precision), but the
> slower data transfer rate for double precision makes operations on double
> precision variables in main memory slower than operation on reals in main
> memory.
I know that such selection may be ambigous, because of:
-the influence of data transfer rate (as you say)
-some operations may be faster with a given kind,
but some other operations may be faster with _another_ kind
-(and probably other ambiguities)
However, even if not perfect, I think that such selection would make selected_real_kind really useful. I've always been frustated with this function, and indeed I don't use it anymore because it lacks essential things. When writing applications in Fortran, performance is often a critical point, and the selection of the fastest kind should be possible.
A less ambigous selection may be 'SMALLEST' versus 'NATIVE'. 'NATIVE' would select a kind that is hardware supported (if there's no, then the smallest should be chosen). Hardware support is perhaps not a 100% garantee for the fastest execution, but gives a reasonnably high probability for that.
Pierre
--
+-----------------------------------+----------------------------+
| Pierre Hugonnet | mail....CGG |
| | 1, rue Leon Migaux |
| R&D Data Processing | 91341 MASSY cedex |
| | FRANCE |
| COMPAGNIE GENERALE DE GEOPHYSIQUE | phone...(33) 164 47 45 59 |
| Paris Processing Centre | fax.....(33) 164 47 32 49 |
| http://www.cgg.com | [log in to unmask] |
+-----------------------------------+----------------------------+
My opinions are not necessarily those of CGG
--------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|