Reverses the byte order of a vector.
IppStatus ippsSwapBytes_16u(const Ipp16u* pSrc, Ipp16u* pDst, int len);
IppStatus ippsSwapBytes_24u(const Ipp8u* pSrc, Ipp8u* pDst, int len);
IppStatus ippsSwapBytes_32u(const Ipp32u* pSrc, Ipp32u* pDst, int len);
IppStatus ippsSwapBytes_64u(const Ipp64u* pSrc, Ipp64u* pDst, int len);
IppStatus ippsSwapBytes_16u_I(Ipp16u* pSrcDst, int len);
IppStatus ippsSwapBytes_24u_I(Ipp8u* pSrcDst, int len);
IppStatus ippsSwapBytes_32u_I(Ipp32u* pSrcDst, int len);
IppStatus ippsSwapBytes_64u_I(Ipp64u* pSrcDst, int len);
pSrc |
Pointer to the source vector. |
pDst |
Pointer to the destination vector. |
pSrcDst |
Pointer to the source and destination vector for the in-place operation. |
len |
Number of elements in the vector. |
The function ippsSwapBytes is declared in the ipps.h file. This function reverses the endian order (byte order) of the source vector pSrc (pSrcDst for the in-place operation) and stores the result in pDst (pSrcDst). When the low-order byte is stored in memory at the lowest address, and the high-order byte at the highest address, the little-endian order is implemented.When the high-order byte is stored in memory at the lowest address, and the low-order byte at the highest address, the big-endian order is implemented. The function ippsSwapBytes allows to switch from one order to the other in either direction.
The example below shows how to call the function ippsSwapBytes_16u_I.
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error when any of the specified pointers is NULL. |
ippStsSizeErr |
Indicates an error when len is less than or equal to 0. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.