Re: MPI_TYPE_DUP

Eric Salo (salo@mrjones.engr.sgi.com)
Mon, 16 Dec 1996 13:06:03 -0800

> This is *not* adding an indirection, there's already an indirection in
> your implementation if you are using integers as the representation of
> MPI_DATATYPE. The MPI 1.1 rulings on constness of MPI constants such
> as MPI_INT appear to force these to be integers, and the MPI-2 stuff
> on language inter-operability also pushes in this direction.

Yes, I understand that, and as a result of MPI 1.1 we did change all of our
opaque MPI objects into integers. But I still don't understand why MPI_TYPE_DUP
as proposed would not add yet another level of indirection. (Sorry if I'm being
dense.) In our implementation, for example, a datatype handle is an index into
a table. Once we find the appropriate entry in the table, all of the needed
information is right there. Now, let's look at the struct that you mentioned:

struct
{
Implementation_attr_cache * cache;
Implementation_datatype * datatype;
};

It seems to me that I must first index into one table to locate the proper
entry of the above type, and then follow the datatype pointer to get to the
good stuff.

What is the obvious point that I am missing here?

-- 
Eric Salo         Silicon Graphics Inc.             "Do you know what the
(415)933-2998     2011 N. Shoreline Blvd, 8U-802     last Xon said, just
salo@sgi.com      Mountain View, CA   94043-1389     before he died?"