> I recall being shocked that this actually worked at all when I first
> ran into it. I was trying to track down a performance problem that
> turned out to be the copy-in/copy-out. Once I found that was the
> problem, I realized what I was asking it to do. It had never occurred
> to me that a compiler would do copy-in/copy-out to make such a thing
> work.
>
Indeed. When I first started using Fortran 90 I just assumed you
couldn't do it, because you were basically asking the compiler to
'cast' a complex type like an array slice, into a simple pointer to
memory. Also, my experience with compilers back then seemed to support
my conjecture that it wasn't allowed.
But I have since learned that it is possible, and compilers do support
it. So now I make use of it occasionally, and don't think about it too
much, other than when a ghost from the past, in the form of a compiler
bug, reminds me.
Drew
---------------------------------------------------------
Drew McCormack
www.maniacalextent.com
|