函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\zstd\huf_compress.c Create Date:2022-07-27 07:59:52
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:HUF_compressWeights_wksp

函数原型:size_t HUF_compressWeights_wksp(void *dst, size_t dstSize, const void *weightTable, size_t wtSize, void *workspace, size_t workspaceSize)

返回类型:size_t

参数:

类型参数名称
void *dst
size_tdstSize
const void *weightTable
size_twtSize
void *workspace
size_tworkspaceSize
84  ostart等于dst
85  op等于ostart
86  oend等于ostartdstSize
88  maxSymbolValue等于max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG
89  tableLog等于HUF_compressWeights() :* Same as FSE_compress(), but dedicated to huff0's weights compression.* The use case needs much less stack memory.* Note : all elements within weightTable are supposed to be <= HUF_TABLELOG_MAX.
94  spaceUsed32等于0
98  CTable等于workspacespaceUsed32
99  spaceUsed32加等于It is possible to statically allocate FSE CTable/DTable as a table of FSE_CTable/FSE_DTable using below macros (HUF_compressWeights() :* Same as FSE_compress(), but dedicated to huff0's weights compression.* The use case needs much less stack memory.* Note : all elements within weightTable are supposed to be <= HUF_TABLELOG_MAX., max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG )
100  count等于workspacespaceUsed32
101  spaceUsed32加等于max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG 加1
102  norm等于workspacespaceUsed32
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  如果spaceUsed32左移2位大于workspaceSize则返回:-***************************************** Error codes handling(tableLog_tooLarge)
107  workspace等于workspacespaceUsed32
108  workspaceSize减等于spaceUsed32左移2位
111  如果wtSize小于等于1则返回:0
116  CHECK_V_F(maxCount, : count of most numerous element)
117  如果maxCount恒等于wtSize则返回:1
119  如果maxCount恒等于1则返回:0
123  tableLog等于FSE_optimalTableLog(tableLog, wtSize, maxSymbolValue)
128  CHECK_V_F(hSize, FSE_writeNCount(op, oend - op, norm, maxSymbolValue, tableLog))
129  op加等于hSize
135  CHECK_V_F(cSize, FSE_compress_usingCTable(op, oend - op, weightTable, wtSize, CTable))
136  如果cSize恒等于0则返回:0
138  op加等于cSize
141  返回:opostart
调用者
名称描述
HUF_writeCTable_wksp : size of saved CTable