MPI 04.00 Reference >> mpiPlatform

mpiPlatformWord64Orient

Declaration

int32_t mpiPlatformWord64Orient(MPIPlatform  platform,
                             MPIInt64     *dst,
                             MPIInt64     *src)

 

Required Header: stdmpi.h
Change History: Added in the 03.04.00

This function is used to orient the two 32-bit words within a 64-bit entity. This function is needed when reading/writing 64-bit entites from/to the controller where the Get/Set64 functions cannot be used. The function is needed because the XMP is little endian and the ZMP is big endian. The low level MPI read/write functions already deal with byte swapping the bytes within a 32-bit word when reading/writing from/to the controller. The problem is that the generalized low level functions do not know which data is 64-bit data and cannot automatically swap the words. The Get/Set64 function do know that the data being written/read is 64 bits and automatically swaps the 32-bit words when needed.

This function will do nothing to the data for an XMP, but will swap the two 32-bit words for a ZMP. This function should be used when writing general code that could run on either an XMP or a ZMP controller.

platform
dst a pointer to 64-bit entity where oriented data will be written. Data should be on the host, not the controller.
src a pointer to 64-bit entity to be oriented. Data should be on the host, not the controller.
Returns
MPIMessageOK