[MPI3 Fortran] MPI Fortran bindings
    Jim Xia 
    jimxia at ca.ibm.com
       
    Fri Jun  5 14:43:02 CDT 2009
    
    
  
> > 
> >  > INTENT doesn't help with non-contiguous buffers. 
> > 
> > There is a subtle difference an intent can make: INTENT(IN) will 
> > suppress copy-out if copying has to be made by the compiler.
> 
> Yes, this is a good point in favor of intent.  Similarly, an INTENT(OUT) 
> dummy would suppress a copy-in before the call.
That's not true.  An INTENT(OUT) will not always suppress a copy-in. How 
would you suppress the copy-in of x(::2) at call foo for the following 
case?
module m
    contains
    subroutine foo (x)
        real, intent(out) :: x(3)
        x(:) = [1,2,3]
    end subroutine
end module
use m
    real x(10)
    call foo(x(::2))
end
Cheers,
Jim Xia
XL Fortran Compiler Test
IBM Toronto Lab at 8200 Warden Ave, Markham, On, L6G 1C7
Phone (905) 413-3444  Tie-line 313-3444
email: jimxia at ca.ibm.com
D2/YF7/8200 /MKM
http://www.ibm.com/software/awdtools/fortran/xlfortran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-fortran/attachments/20090605/905b8b95/attachment-0001.html>
    
    
More information about the mpiwg-fortran
mailing list