(j3.2006) TKR for C Interop

Aleksandar Donev donev1
Wed Feb 28 02:03:36 EST 2007

Bill Long wrote:

> The reason was to give vendors enough information to 
> create valid dope vectors.
This information can be filled by the Fortran callee. The callee knows 
what the TKR signature is, and all it needs from the caller are the 
bounds and strides and base address. In fact, at least one vendor has 
exactly those and only those fields in the descriptor. And if the callee 
is in C, it does not need a "valid" dope vector, it just needs a vector 
it can extract bounds and base address from.

> Not just one vendor, but all the vendors.  
No, look at NAGs descriptors, they are publicly documented. TKR info 
does NOT need to be included in a descriptor to implement fortran, any 
variant of it up to know. For polymorphic arguments, a type descriptor 
is needed, which could be separate from the array descriptor (but does 
not have to be).

> This is a basic implementation and performance issue.  To say that the 
> TKR information is "useless" without these other features is just nonsense.
You just want to make the Fortran routine more efficient (by a miniscule 
amount), namely, so it does not have to do any massaging of the passed 
descriptor, while making the life of the programmer that needs to 
construct said descriptors and the API sooo much more complicated. 
Either make the API minimal (but less functional), or complex (but 
functional). Anything in-between is nonsense.


More information about the J3 mailing list