Lines Matching refs:count
46 U32 count; member
140 unsigned count[HUF_TABLELOG_MAX+1]; member
163 …{ unsigned const maxCount = HIST_count_simple(wksp->count, &maxSymbolValue, weightTable, wtSize)… in HUF_compressWeights()
169 …CHECK_F( FSE_normalizeCount(wksp->norm, tableLog, wksp->count, wtSize, maxSymbolValue, /* useLowPr… in HUF_compressWeights()
434 { U32 const highTotal = huffNode[highPos].count; in HUF_setMaxHeight()
435 U32 const lowTotal = 2 * huffNode[lowPos].count; in HUF_setMaxHeight()
528 static U32 HUF_getIndex(U32 const count) { in HUF_getIndex() argument
529 return (count < RANK_POSITION_DISTINCT_COUNT_CUTOFF) in HUF_getIndex()
530 ? count in HUF_getIndex()
531 : ZSTD_highbit32(count) + RANK_POSITION_LOG_BUCKETS_BEGIN; in HUF_getIndex()
545 if (huffNode[i].count > huffNode[i-1].count) { in HUF_isSorted()
560 while (j >= 0 && huffNode[j].count < key.count) { in HUF_insertionSort()
573 U32 const pivot = arr[high].count; in HUF_quickSortPartition()
577 if (arr[j].count > pivot) { in HUF_quickSortPartition()
618 static void HUF_sort(nodeElt huffNode[], const unsigned count[], U32 const maxSymbolValue, rankPos … in HUF_sort() argument
630 U32 lowerRank = HUF_getIndex(count[n]); in HUF_sort()
644 U32 const c = count[n]; in HUF_sort()
648 huffNode[pos].count = c; in HUF_sort()
689 while(huffNode[nonNullRank].count == 0) nonNullRank--; in HUF_buildTree()
691 huffNode[nodeNb].count = huffNode[lowS].count + huffNode[lowS-1].count; in HUF_buildTree()
694 for (n=nodeNb; n<=nodeRoot; n++) huffNode[n].count = (U32)(1U<<30); in HUF_buildTree()
695 huffNode0[0].count = (U32)(1U<<31); /* fake entry, strong barrier */ in HUF_buildTree()
699 int const n1 = (huffNode[lowS].count < huffNode[lowN].count) ? lowS-- : lowN++; in HUF_buildTree()
700 int const n2 = (huffNode[lowS].count < huffNode[lowN].count) ? lowS-- : lowN++; in HUF_buildTree()
701 huffNode[nodeNb].count = huffNode[n1].count + huffNode[n2].count; in HUF_buildTree()
754 HUF_buildCTable_wksp(HUF_CElt* CTable, const unsigned* count, U32 maxSymbolValue, U32 maxNbBits, in HUF_buildCTable_wksp() argument
776 HUF_sort(huffNode, count, maxSymbolValue, wksp_tables->rankPosition); in HUF_buildCTable_wksp()
791 size_t HUF_estimateCompressedSize(const HUF_CElt* CTable, const unsigned* count, unsigned maxSymbol… in HUF_estimateCompressedSize() argument
797 nbBits += HUF_getNbBits(ct[s]) * count[s]; in HUF_estimateCompressedSize()
802 int HUF_validateCTable(const HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue) { in HUF_validateCTable() argument
814 bad |= (count[s] != 0) & (HUF_getNbBits(ct[s]) == 0); in HUF_validateCTable()
1240 unsigned count[HUF_SYMBOLVALUE_MAX + 1]; member
1252 unsigned HUF_cardinality(const unsigned* count, unsigned maxSymbolValue) in HUF_cardinality() argument
1258 if (count[i] != 0) cardinality += 1; in HUF_cardinality()
1276 const unsigned* count, in HUF_optimalTableLog() argument
1290 const unsigned symbolCardinality = HUF_cardinality(count, maxSymbolValue); in HUF_optimalTableLog()
1301 …{ size_t maxBits = HUF_buildCTable_wksp(table, count, maxSymbolValue, optLogGuess, workSpace, wk… in HUF_optimalTableLog()
1311 newSize = HUF_estimateCompressedSize(table, count, maxSymbolValue) + hSize; in HUF_optimalTableLog()
1369 …CHECK_V_F(largestBegin, HIST_count_simple (table->count, &maxSymbolValueBegin, (const BYTE*)src, S… in HUF_compress_internal()
1373 …CHECK_V_F(largestEnd, HIST_count_simple (table->count, &maxSymbolValueEnd, (const BYTE*)src + srcS… in HUF_compress_internal()
1380 …{ CHECK_V_F(largest, HIST_count_wksp (table->count, &maxSymbolValue, (const BYTE*)src, srcSize, … in HUF_compress_internal()
1384 … DEBUGLOG(6, "histogram detail completed (%zu symbols)", showU32(table->count, maxSymbolValue+1)); in HUF_compress_internal()
1389 && !HUF_validateCTable(oldHufTable, table->count, maxSymbolValue)) { in HUF_compress_internal()
1400 … srcSize, maxSymbolValue, &table->wksps, sizeof(table->wksps), table->CTable, table->count, flags); in HUF_compress_internal()
1401 { size_t const maxBits = HUF_buildCTable_wksp(table->CTable, table->count, in HUF_compress_internal()
1414 … size_t const oldSize = HUF_estimateCompressedSize(oldHufTable, table->count, maxSymbolValue); in HUF_compress_internal()
1415 … size_t const newSize = HUF_estimateCompressedSize(table->CTable, table->count, maxSymbolValue); in HUF_compress_internal()