GetSortTmpSize
Function Usage
Obtains the size of the temporary space required by the Sort API.
Prototype
1 | inline uint32_t GetSortTmpSize(const platform_ascendc::PlatformAscendC &ascendcPlatform, const uint32_t elemCount, const uint32_t dataTypeSize) |
Parameters
API |
Input/Output |
Function |
|---|---|---|
ascendcPlatform |
Input |
Hardware platform information that is passed. For details about the definition of PlatformAscendC, see Overview. |
elemCount |
Input |
Number of elements of the input data. |
dataTypeSize |
Input |
Size of the input data, in bytes |
Returns
Size of the temporary space required by the Sort API.
Availability
Example
1 2 3 4 | fe::PlatFormInfos platform_info; auto plat = platform_ascendc::PlatformAscendC(&platform_info); const uint32_t elemCount = 128; AscendC::GetSortTmpSize(plat, elemCount, 4); |
Parent topic: Sort