Lines Matching +full:step +full:- +full:down

1 // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
7 * - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy
8 * - Public forum : https://groups.google.com/forum/#!forum/lz4c
10 * This source code is licensed under both the BSD-style license (found in the
13 * You may select, at your option, one of the above-listed licenses.
42 for type-specific functions (template emulation in C)
61 void* const tdPtr = dt+1; /* because *dt is unsigned, 32-bits aligned on 32-bits */ in FSE_buildDTable_internal()
68 U32 highThreshold = tableSize-1; in FSE_buildDTable_internal()
75 /* Init, lay down lowprob symbols */ in FSE_buildDTable_internal()
79 { S16 const largeLimit= (S16)(1 << (tableLog-1)); in FSE_buildDTable_internal()
82 if (normalizedCounter[s]==-1) { in FSE_buildDTable_internal()
83 tableDecode[highThreshold--].symbol = (FSE_FUNCTION_TYPE)s; in FSE_buildDTable_internal()
93 if (highThreshold == tableSize - 1) { in FSE_buildDTable_internal()
94 size_t const tableMask = tableSize-1; in FSE_buildDTable_internal()
95 size_t const step = FSE_TABLESTEP(tableSize); in FSE_buildDTable_internal() local
96 /* First lay down the symbols in order. in FSE_buildDTable_internal()
97 * We use a uint64_t to lay down 8 bytes at a time. This reduces branch in FSE_buildDTable_internal()
100 * our buffer to handle the over-write. in FSE_buildDTable_internal()
129 size_t const uPosition = (position + (u * step)) & tableMask; in FSE_buildDTable_internal()
132 position = (position + (unroll * step)) & tableMask; in FSE_buildDTable_internal()
137 U32 const tableMask = tableSize-1; in FSE_buildDTable_internal()
138 U32 const step = FSE_TABLESTEP(tableSize); in FSE_buildDTable_internal() local
144 position = (position + step) & tableMask; in FSE_buildDTable_internal()
145 … while (position > highThreshold) position = (position + step) & tableMask; /* lowprob area */ in FSE_buildDTable_internal()
155 tableDecode[u].nbBits = (BYTE) (tableLog - ZSTD_highbit32(nextState) ); in FSE_buildDTable_internal()
156 tableDecode[u].newState = (U16) ( (nextState << tableDecode[u].nbBits) - tableSize); in FSE_buildDTable_internal()
170 /*-*******************************************************
182 BYTE* const olimit = omax-3; in FSE_decompress_usingDTable_generic()
221 if (op>(omax-2)) return ERROR(dstSize_tooSmall); in FSE_decompress_usingDTable_generic()
228 if (op>(omax-2)) return ERROR(dstSize_tooSmall); in FSE_decompress_usingDTable_generic()
236 return (size_t)(op-ostart); in FSE_decompress_usingDTable_generic()
266 FSE_readNCount_bmi2(wksp->ncount, &maxSymbolValue, &tableLog, istart, cSrcSize, bmi2); in FSE_decompress_wksp_body()
271 cSrcSize -= NCountLength; in FSE_decompress_wksp_body()
277 wkspSize -= sizeof(*wksp) + FSE_DTABLE_SIZE(tableLog); in FSE_decompress_wksp_body()
279 …CHECK_F( FSE_buildDTable_internal(dtable, wksp->ncount, maxSymbolValue, tableLog, workSpace, wkspS… in FSE_decompress_wksp_body()
284 const U32 fastMode = DTableH->fastMode; in FSE_decompress_wksp_body()