David Vowles writes:
> However, from a practical point of view I have the following
> question (which is not rhetorical); I would be interested if anybody
> could point out any "serious" compilers that do not support the
> double complex extension?
I don't keep records of which compilers support which variants, but
I have certainly run into plenty of compilers that didn't support
double complex. I don't know how to interpret the use of the
term "serious" here. They were certainly compilers that I was
seriously trying to use.
In addition to compilers that didn't support it at all, perhaps
a more pervasive problem was the differences in detail between
different compilers. I have certainly run into incompatabilities
like
1. Some compilers supported only the declaration form "double complex"
and would not recognize, for example, "complex*32". Fine, you
might say. After all, the form "complex*32" is clearly a variant
of a nonstandard declaration form. Alas, I also distinctly
recall using compilers that accepted *ONLY* the form "complex*32"
and not "double complex". Well, at least that's a fairly easy
global search and replace.
Interestingly LAPACK uses both forms. Umm. I better recant on
that. I'm recalling one of the packages included with Octave.
I think it was LAPACK, but it might have been one of the others.
But I distinctly recall noting the oddity that one form was
used almost everywhere, but there were a few isolated instances
of the other - which I noticed because the compiler I was trying
to use rejected it.
2. There are certainly quite a few compilers that accept the basic
declarations (in one form or another), but then vary widely on
the degreee of support in intrinsic functions. Some compilers
provide only specific intrinsics (with some variations in the
names, but no generics). Others just plain omit some of the
intrinsics. Then there is the f90 standard, which requires
generic support for all the complex kinds, but doesn't define
specifics in several cases.
I've run into this with the LAPACK code, which mostly uses
the specific names (with some exceptions, I think). For
example, it used names like DCONJ (or something of the sort-
I might not have the spelling quite right), which is not
standard f90. I had to delete the D to make my f90 compiler
accept it.
> In Fortran90, is the following a standard conforming way of
> implementing the double complex type?
>
> DP = KIND(0.0D0)
> COMPLEX (KIND = DP) :: X
Sure (assuming DP is declared integer). I don't have time to dig
out the citations to support it right now, but I recall it as
being pretty explicit.
--
Richard Maine
[log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|