Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\zstd\fse_compress.c Create Date:2022-07-28 07:02:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:FSE_count_parallel_wksp() :* Same as FSE_count_parallel(), but using an externally provided scratch buffer.* `workSpace` size must be a minimum of `1024 * sizeof(unsigned)``

Proto:static size_t FSE_count_parallel_wksp(unsigned *count, unsigned *maxSymbolValuePtr, const void *source, size_t sourceSize, unsigned checkMax, unsigned *const workSpace)

Type:size_t

Parameter:

TypeParameterName
unsigned *count
unsigned *maxSymbolValuePtr
const void *source
size_tsourceSize
unsignedcheckMax
unsigned *constworkSpace
360  ip = source
361  iend = ip + sourceSize
362  maxSymbolValue = maxSymbolValuePtr
363  max = 0
364  Counting1 = workSpace
365  Counting2 = Counting1 + 256
366  Counting3 = Counting2 + 256
367  Counting4 = Counting3 + 256
369  memset(Counting1, 0, 4 * 256 * sizeof(unsigned))
372  If Not sourceSize Then
373  memset(count, 0, maxSymbolValue + 1)
374  maxSymbolValuePtr = 0
375  Return 0
377  If Not maxSymbolValue Then maxSymbolValue = 255
382  cached = ZSTD_read32(ip)
383  ip += 4
384  When ip < iend - 15 cycle
385  c = cached
386  cached = ZSTD_read32(ip)
387  ip += 4
388  Counting1[(BYTE)c]++
389  Counting2[(BYTE)(c >> 8)]++
390  Counting3[(BYTE)(c >> 16)]++
391  Counting4[c >> 24]++
392  c = cached
393  cached = ZSTD_read32(ip)
394  ip += 4
395  Counting1[(BYTE)c]++
396  Counting2[(BYTE)(c >> 8)]++
397  Counting3[(BYTE)(c >> 16)]++
398  Counting4[c >> 24]++
399  c = cached
400  cached = ZSTD_read32(ip)
401  ip += 4
402  Counting1[(BYTE)c]++
403  Counting2[(BYTE)(c >> 8)]++
404  Counting3[(BYTE)(c >> 16)]++
405  Counting4[c >> 24]++
406  c = cached
407  cached = ZSTD_read32(ip)
408  ip += 4
409  Counting1[(BYTE)c]++
410  Counting2[(BYTE)(c >> 8)]++
411  Counting3[(BYTE)(c >> 16)]++
412  Counting4[c >> 24]++
414  ip -= 4
418  When ip < iend cycle
419  Counting1[ * ip++]++
421  If checkMax Then
423  When s > maxSymbolValue cycle
432  When s <= maxSymbolValue cycle
434  If count[s] > max Then max = count[s]
439  When Not count[maxSymbolValue] cycle
440  maxSymbolValue--
441  maxSymbolValuePtr = maxSymbolValue
442  Return max
Caller
NameDescribe
FSE_countFast_wkspFSE_countFast_wksp() :* Same as FSE_countFast(), but using an externally provided scratch buffer.* `workSpace` size must be table of >= `1024` unsigned
FSE_count_wkspFSE_count_wksp() :* Same as FSE_count(), but using an externally provided scratch buffer.* `workSpace` size must be table of >= `1024` unsigned