From rz48@rz.uni-karlsruhe.de  Wed Jan 29 20:13:32 1997
Received: from nz11.rz.uni-karlsruhe.de (nz11.rz.uni-karlsruhe.de [129.13.64.7]) by dkuug.dk (8.6.12/8.6.12) with ESMTP id UAA09066 for <sc22wg5@dkuug.dk>; Wed, 29 Jan 1997 20:13:21 +0100
Message-Id: <199701291913.UAA09066@dkuug.dk>
Received: from ry71.rz.uni-karlsruhe.de by nz11.rz.uni-karlsruhe.de with SMTP (PP); Wed, 29 Jan 1997 11:48:16 +0100
Received: by ry71.rz.uni-karlsruhe.de
	(1.38.193.4/16.2) id AA28690; Wed, 29 Jan 1997 11:48:13 +0100
Subject: PASS_BY("descriptor")
To: jcownie@dolphinics.com (James Cownie)
Date: Wed, 29 Jan 1997 11:48:13 +0100 (CET)
Cc: mpi-bind@mcs.anl.gov, sc22wg5@dkuug.dk
In-Reply-To: <199701281326.NAA12882@mailhost.dircon.co.uk> from "James Cownie" at Jan 28, 97 01:13:24 pm
From: hennecke@rz.uni-karlsruhe.de (Michael Hennecke)
Reply-To: hennecke@rz.uni-karlsruhe.de (Michael Hennecke)
X-Mailer: ELM [version 2.4 PL23]
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Content-Length: 2151      

According to James Cownie:
>             ... it might be possible to extend the current draft to
> allow the passing of array sections by providing functions on the C
> side to unpick the descriptor. 
> ...
> 2) Add a paragraph to describe this
> 
>    A pass_by_string of "descriptor" is interpreted as causing the
>    address of a descriptor for the given entity to be passed. The 
>    corresponding argument in the parameter list of the C function
>    should be given as of type "fortran_desc". 
> 
>    The actual argument which matches a "descriptor" formal argument
>    must be an argument which would match an assumed shape formal
>    argument of any rank.
> ...

I thought of this, but discarded it for the TR because I believe that
it is not possible to agree on the contents of Fortran descriptors 
(or access methods if they are opaque) within the current time schedule.

There is no such thing as THE Fortran descriptor. For performance
reasons, arrays of different ranks will probably have descriptors with
different numbers of triplets (one for each array dimension), characters 
will also have a length field, and vendors will probably not find consensus
on a specification for these implementation dependent details.

However, this issue should be kept in mind for the integration of the
interoperability technical report into the main F2000 revision.

Thanks,
Michael

PS: I guess HPFF had a similar problem with descriptors for mapped arrays. 
    I once saw a proposal for MADs (mapped array descriptors), but didn't
    find it in the HPF-2 draft...

 ======================================================================
  Michael Hennecke      http://www.uni-karlsruhe.de/~Michael.Hennecke/ 
 ----------------------------------------------------------------------
  University of Karlsruhe         RFC822: hennecke@rz.uni-karlsruhe.de 
  Computing Center (G20.21 R210)               No longer on BITNET :-(
  Zirkel 2  *  P.O. Box 69 80                 Phone: +49 721  608-4862 
  D-76128  Karlsruhe                               Fax: +49 721  32550 
 ======================================================================
