Hello,
> If I were doing this in Fortran 77, I would write something like
>
> real X
> integer K
> equivalence ( X, K )
> ...
> x = array(i)
> ... ibits(k...) ...
Thanks a lot. Thanks to backward compatibility this worked very well. Since
I never use F77 constructs such as COMMON, EQUIVALENCE, SEQUENCE, GOTO, etc.
(simply because there are better F90 alternatives), it never occured to me
to use EQUIVALENCE (sort of a Fortran union). It should also be trivial for
compilers to use as an idiom when they see TRANSFER and then use the old
equivalence optimizations/translation.
My (interesting!) timing results to come shortly...
Aleksandar
_____________________________________________
Aleksandar Donev
http://www.pa.msu.edu/~donev/
[log in to unmask]
(517) 432-6770
Department of Physics and Astronomy
Michigan State University
East Lansing, MI 48824-1116
_____________________________________________
|