Function report |
Source Code:lib\zstd\huf_compress.c |
Create Date:2022-07-28 07:02:18 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:HUF_compressWeights_wksp
Proto:size_t HUF_compressWeights_wksp(void *dst, size_t dstSize, const void *weightTable, size_t wtSize, void *workspace, size_t workspaceSize)
Type:size_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| void * | dst | |
| size_t | dstSize | |
| const void * | weightTable | |
| size_t | wtSize | |
| void * | workspace | |
| size_t | workspaceSize |
| 88 | maxSymbolValue = max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG |
| 94 | spaceUsed32 = 0 |
| 98 | CTable = workspace + spaceUsed32 |
| 100 | count = workspace + spaceUsed32 |
| 101 | spaceUsed32 += max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG + 1 |
| 102 | norm = workspace + spaceUsed32 |
| 103 | spaceUsed32 += @a is a power of 2 value (sizeof(S16) * (max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG + 1), sizeof(U32)) >> 2 |
| 105 | If spaceUsed32 << 2 > workspaceSize Then Return -***************************************** Error codes handling(tableLog_tooLarge) |
| 107 | workspace = workspace + spaceUsed32 |
| 108 | workspaceSize -= spaceUsed32 << 2 |
| 111 | If wtSize <= 1 Then Return 0 |
| 119 | If maxCount == 1 Then Return 0 |
| 128 | CHECK_V_F(hSize, FSE_writeNCount(op, oend - op, norm, maxSymbolValue, tableLog)) |
| 135 | CHECK_V_F(cSize, FSE_compress_usingCTable(op, oend - op, weightTable, wtSize, CTable)) |
| 136 | If cSize == 0 Then Return 0 |
| Name | Describe |
|---|---|
| HUF_writeCTable_wksp | : size of saved CTable |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |