I am implementing a message passing interface and one of the qualifications of its standards are custom MPI datatypes that map to say C datatypes. E.g
MPI_INT maps to the C
So simple enough I would like to do:
typedef int MPI_INT; typedef short int MPI_SHORT; ... ... ... etc
But I want all these custom datatypes to be under a more general datatype called MPI_Datatype such that I could make a function prototype such as
where MPI_Datatype is one of MPI_INT, MPI_SHORT, etc
I'm not really sure how one would do this in C so if anyone has an idea that would be superb.