Bill Long wrote:
>
> Pierre Hugonnet wrote:
> >
>
> >
> > As it was recently discussed on the list, this is a mid-term portability: to be
> > portable
> > you must be based on the kinds REAL and DOUBLE PRECISION. This prevents to
> > really use the intrinsic power of KIND and SELECTED_REAL_KIND features,
> > which were a good idea, but the standard commitee stopped on the way: it should
> > have reserved constants for 'standard' kind values, for instance:
> > KIND=SNGL would give prec>=6 & range>=25
> > KIND=DBLE would give prec>=12 & range>=50
> > KIND=XTND would give prec>=24 & range>=100
> > This is the only (?) solution to write portable code without any reference to
> > REAL and
> > DOUBLE PRECISION (it's not too late to do that, in the same way than the
> > ISO_VARYING_STRING module...)
> >
>
> Hi Pierre,
>
> If this were included in the standard, there would be an implicit
> assumption about the hardware that SNGL and DBLE were actually
> different. For systems where 64-bits is the smallest available hardware,
> this would be false.
No need of this assumption: SNGL would require *at least* 6 digits, and
DBLE would require *at least* 12 digits, but without any reference to
the hardware and implementation: the kinds could be be different or equal
depending on the available hardware and on the implementation.
Of course the current impossibility to have two subroutines with the
same generic name and the same arguments would be a problem in the case
of equal kinds: we would need to remove to this impossibility,
or tools like conditional compilation.
> To allow for portability between PC's and
> supercomputers is precisely why hardware-specific kind values are NOT
> specified in the standard. The current system provides superior
> portability. For most purposes, the definition of R64 to be your "dble"
> will suffice. I prefer R64 since this represents single precision on
> some systems and double on others, so is "neutral", yet conveys what the
> user really wants.
>
This is not different from what I say :-)
With the current system, everybody defines its own kind constants: don't
imagine to build public libraries like BLAS, LAPACK like that. At
the moment these libraries can be written only with references to
REAL & DOUBLE PRECISION.
--
+-----------------------------------+-----------------------------+
| Pierre Hugonnet | mail....CGG |
| | 1, rue Leon Migaux |
| Seismic Data Processing R&D | 91341 MASSY cedex |
| | FRANCE |
| COMPAGNIE GENERALE DE GEOPHYSIQUE | phone...(33/0) 164 47 45 59 |
| Massy processing center (France) | fax.....(33/0) 164 47 32 49 |
| http://www.cgg.com | [log in to unmask] |
+-----------------------------------+-----------------------------+
My opinions are not necessarily those of CGG
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|