next up previous contents
Next: Problems due to strong Up: MPI Java Wrapper Implementation. Previous: Java native method   Contents

Java datatypes

The following table lists all of the Java basic simple type and their corresponding C/C++ and MPI datatype.

Java datatype	C/C++ datatype	MPI datatype
byte	signed char	MPI_CHAR
char	signed short int	MPI_SHORT
short	signed short int	MPI_SHORT
boolean	signed long int	MPI_LONG
int	signed long int	MPI_LONG
long	signed long long int	MPI_LONG_LONG_INT
float	float	MPI_FLOAT
double	double	MPI_DOUBLE
Because Java is platform independent, the size of simple type will be the same in all platforms. So in order to fit into some system that has 64bits pointer, we use the long in Java to store the MPI object handle or pointer reference.

Bryan Carpenter 2002-07-12