Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 3/22/2024
Public
Document Table of Contents

SortRadixIndexAscend, SortRadixIndexDescend

Indirectly sorts all elements of a vector using radix sorting algorithm.

Syntax

IppStatus ippsSortRadixIndexAscend_8u(const Ipp8u* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexAscend_16u(const Ipp16u* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexAscend_16s(const Ipp16s* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexAscend_32s(const Ipp32s* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexAscend_32u(const Ipp32u* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexAscend_32f(const Ipp32f* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexAscend_64f(const Ipp64f* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexAscend_64s(const Ipp64s* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexAscend_64u(const Ipp64u* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexDescend_8u(const Ipp8u* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexDescend_16u(const Ipp16u* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexDescend_16s(const Ipp16s* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexDescend_32s(const Ipp32s* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexDescend_32u(const Ipp32u* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexDescend_32f(const Ipp32f* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexDescend_64f(const Ipp64f* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexDescend_64s(const Ipp64s* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexDescend_64u(const Ipp64u* pSrc, Ipp32s srcStrideBytes, Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

Radix Sorting Algorithm for platform-aware functions

IppStatus ippsSortRadixIndexAscend_64s_L(const Ipp64s* pSrc, IppSizeL srcStrideBytes, IppSizeL* pDstIndx, IppSizeL len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexAscend_64u_L(const Ipp64u* pSrc, IppSizeL srcStrideBytes, IppSizeL* pDstIndx, IppSizeL len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexDescend_64s_L(const Ipp64s* pSrc, IppSizeL srcStrideBytes, IppSizeL* pDstIndx, IppSizeL len, Ipp8u* pBuffer);

IppStatus ippsSortRadixIndexDescend_64u_L(const Ipp64u* pSrc, IppSizeL srcStrideBytes, IppSizeL* pDstIndx, IppSizeL len, Ipp8u* pBuffer);

Include Files

ipps.h

Flavors with the _L suffix: ipps_l.h

Domain Dependencies

Headers: ippcore.h, ippvm.h

Libraries: ippcore.lib, ippvm.lib

Parameters

pSrc

Pointer the source sparse keys vector.

srcStrideBytes

Distance in bytes between two consecutive elements of the source vector.

pDstIndx

Pointer to the destination vector of indexes.

len

Number of elements in the vectors.

pBuffer

Pointer to the work buffer for internal calculations. To compute the size of the buffer, use the SortRadixIndexGetBufferSize function.

Description

These functions indirectly sort all elements of the source sparse keys vector pSrc in the ascending or descending order, respectively, using "radix sort" algorithm and store the indexes of resulting arrangement order in the destination vector pDstIndx. Elements of the source vector are not rearranged.

These functions require the work buffer for internal calculations, to compute the size of the required buffer, use the SortRadixIndexGetBufferSize function. Intervals between the elements of the source sparse vector pSrc in memory must be equal to the value of srcStrideBytes, minimum value of which is equal to the size of the data type of the key value. The sorting algorithm does not change the relative order of the elements with equal keys.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc or pBuffer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero, or srcStrideBytes is less than sizeof(key type).

See Also