Home
last modified time | relevance | path

Searched refs:tableSize (Results 1 – 25 of 87) sorted by relevance

1234

/external/guava/android/guava/src/com/google/common/collect/
DHashing.java63 int tableSize = Integer.highestOneBit(expectedEntries); in closedTableSize() local
65 if (expectedEntries > (int) (loadFactor * tableSize)) { in closedTableSize()
66 tableSize <<= 1; in closedTableSize()
67 return (tableSize > 0) ? tableSize : MAX_TABLE_SIZE; in closedTableSize()
69 return tableSize; in closedTableSize()
72 static boolean needsResizing(int size, int tableSize, double loadFactor) { in needsResizing() argument
73 return size > loadFactor * tableSize && tableSize < MAX_TABLE_SIZE; in needsResizing()
DRegularImmutableMap.java80 int tableSize = ImmutableSet.chooseTableSize(n); in create() local
81 Object hashTable = createHashTable(alternatingKeysAndValues, n, tableSize, 0); in create()
90 Object[] alternatingKeysAndValues, int n, int tableSize, int keyOffset) { in createHashTable() argument
97 int mask = tableSize - 1; in createHashTable()
98 if (tableSize <= BYTE_MAX_SIZE) { in createHashTable()
105 byte[] hashTable = new byte[tableSize]; in createHashTable()
125 } else if (tableSize <= SHORT_MAX_SIZE) { in createHashTable()
132 short[] hashTable = new short[tableSize]; in createHashTable()
156 int[] hashTable = new int[tableSize]; in createHashTable()
DImmutableSet.java152 int tableSize = chooseTableSize(n); in construct() local
153 Object[] table = new Object[tableSize]; in construct()
154 int mask = tableSize - 1; in construct()
180 } else if (chooseTableSize(uniques) < tableSize / 2) { in construct()
214 int tableSize = Integer.highestOneBit(setSize - 1) << 1; in chooseTableSize() local
215 while (tableSize * DESIRED_LOAD_FACTOR < setSize) { in chooseTableSize()
216 tableSize <<= 1; in chooseTableSize()
218 return tableSize; in chooseTableSize()
DRegularImmutableBiMap.java54 int tableSize = (size >= 2) ? ImmutableSet.chooseTableSize(size) : 0; in RegularImmutableBiMap() local
56 RegularImmutableMap.createHashTable(alternatingKeysAndValues, size, tableSize, 0); in RegularImmutableBiMap()
58 RegularImmutableMap.createHashTable(alternatingKeysAndValues, size, tableSize, 1); in RegularImmutableBiMap()
/external/guava/guava/src/com/google/common/collect/
DHashing.java63 int tableSize = Integer.highestOneBit(expectedEntries); in closedTableSize() local
65 if (expectedEntries > (int) (loadFactor * tableSize)) { in closedTableSize()
66 tableSize <<= 1; in closedTableSize()
67 return (tableSize > 0) ? tableSize : MAX_TABLE_SIZE; in closedTableSize()
69 return tableSize; in closedTableSize()
72 static boolean needsResizing(int size, int tableSize, double loadFactor) { in needsResizing() argument
73 return size > loadFactor * tableSize && tableSize < MAX_TABLE_SIZE; in needsResizing()
DImmutableSet.java646 int tableSize = Integer.highestOneBit(setSize - 1) << 1;
647 while (tableSize * DESIRED_LOAD_FACTOR < setSize) {
648 tableSize <<= 1;
650 return tableSize;
740 private static int maxRunBeforeFallback(int tableSize) {
741 return MAX_RUN_MULTIPLIER * IntMath.log2(tableSize, RoundingMode.UNNECESSARY);
760 int tableSize = chooseTableSize(expectedCapacity);
761 this.hashTable = new Object[tableSize];
762 this.maxRunBeforeFallback = maxRunBeforeFallback(tableSize);
763 this.expandTableThreshold = (int) (DESIRED_LOAD_FACTOR * tableSize);
/external/brotli/csharp/org/brotli/dec/
DHuffman.cs104 int tableSize = 1 << tableBits; in BuildHuffmanTable()
105 int totalSize = tableSize; in BuildHuffmanTable()
122 ReplicateValue(rootTable, tableOffset + key, step, tableSize, len << 16 | sorted[symbol++]); in BuildHuffmanTable()
136 currentOffset += tableSize; in BuildHuffmanTable()
138 tableSize = 1 << tableBits; in BuildHuffmanTable()
139 totalSize += tableSize; in BuildHuffmanTable()
143 …ReplicateValue(rootTable, currentOffset + (key >> rootBits), step, tableSize, (len - rootBits) << … in BuildHuffmanTable()
/external/brotli/java/org/brotli/dec/
DHuffman.java93 int tableSize = 1 << tableBits; in buildHuffmanTable() local
94 int totalSize = tableSize; in buildHuffmanTable()
109 replicateValue(tableGroup, tableOffset + key, step, tableSize, in buildHuffmanTable()
122 currentOffset += tableSize; in buildHuffmanTable()
124 tableSize = 1 << tableBits; in buildHuffmanTable()
125 totalSize += tableSize; in buildHuffmanTable()
130 replicateValue(tableGroup, currentOffset + (key >> rootBits), step, tableSize, in buildHuffmanTable()
/external/exoplayer/tree/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/
DTrackFragment.java140 int tableSize = (sampleCount * 125) / 100; in initTables() local
141 sampleSizeTable = new int[tableSize]; in initTables()
142 sampleCompositionTimeOffsetUsTable = new int[tableSize]; in initTables()
143 sampleDecodingTimeUsTable = new long[tableSize]; in initTables()
144 sampleIsSyncFrameTable = new boolean[tableSize]; in initTables()
145 sampleHasSubsampleEncryptionTable = new boolean[tableSize]; in initTables()
/external/guava/guava-tests/benchmark/com/google/common/collect/
DImmutableSetHashFloodingDetectionBenchmark.java38 int tableSize = ImmutableSet.chooseTableSize(size); in setUp() local
39 int mask = tableSize - 1; in setUp()
41 tables[i] = new Object[tableSize]; in setUp()
57 int maxRunBeforeFallback(int tableSize) { in maxRunBeforeFallback() argument
58 return 12 * IntMath.log2(tableSize, RoundingMode.UNNECESSARY); in maxRunBeforeFallback()
97 int maxRunBeforeFallback(int tableSize) { in maxRunBeforeFallback() argument
98 return 13 * IntMath.log2(tableSize, RoundingMode.UNNECESSARY); in maxRunBeforeFallback()
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/compressors/lzw/
DLZWInputStream.java49 private int tableSize; field in LZWInputStream
186 if (tableSize < maxTableSize) { in addEntry()
187 prefixes[tableSize] = previousCode; in addEntry()
188 characters[tableSize] = character; in addEntry()
189 return tableSize++; in addEntry()
276 return tableSize; in getTableSize()
280 tableSize = newSize; in setTableSize()
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/archivers/zip/
DUnshrinkingInputStream.java56 int tableSize = getTableSize(); in addEntry() local
57 while ((tableSize < MAX_TABLE_SIZE) && isUsed[tableSize]) { in addEntry()
58 tableSize++; in addEntry()
60 setTableSize(tableSize); in addEntry()
/external/zstd/lib/common/
Dfse_decompress.c79 U32 const tableSize = 1 << tableLog; in FSE_buildDTable_internal() local
80 U32 highThreshold = tableSize-1; in FSE_buildDTable_internal()
105 if (highThreshold == tableSize - 1) { in FSE_buildDTable_internal()
106 size_t const tableMask = tableSize-1; in FSE_buildDTable_internal()
107 size_t const step = FSE_TABLESTEP(tableSize); in FSE_buildDTable_internal()
139 assert(tableSize % unroll == 0); /* FSE_MIN_TABLELOG is 5 */ in FSE_buildDTable_internal()
140 for (s = 0; s < (size_t)tableSize; s += unroll) { in FSE_buildDTable_internal()
151 U32 const tableMask = tableSize-1; in FSE_buildDTable_internal()
152 U32 const step = FSE_TABLESTEP(tableSize); in FSE_buildDTable_internal()
166 for (u=0; u<tableSize; u++) { in FSE_buildDTable_internal()
[all …]
Dfse.h576 { U32 const tableSize = 1 << tableLog; in FSE_bitCost() local
577 U32 const deltaFromThreshold = threshold - (symbolTT[symbolValue].deltaNbBits + tableSize); in FSE_bitCost()
580 assert(symbolTT[symbolValue].deltaNbBits + tableSize <= threshold); in FSE_bitCost()
707 #define FSE_TABLESTEP(tableSize) (((tableSize)>>1) + ((tableSize)>>3) + 3) argument
/external/zstd/lib/compress/
Dfse_compress.c71 U32 const tableSize = 1 << tableLog; in FSE_buildCTable_wksp() local
72 U32 const tableMask = tableSize - 1; in FSE_buildCTable_wksp()
75 void* const FSCT = ((U32*)ptr) + 1 /* header */ + (tableLog ? tableSize>>1 : 1) ; in FSE_buildCTable_wksp()
77 U32 const step = FSE_TABLESTEP(tableSize); in FSE_buildCTable_wksp()
82 U32 highThreshold = tableSize-1; in FSE_buildCTable_wksp()
95 …ZSTD_memset(tableSymbol, 0, sizeof(*tableSymbol) * tableSize); /* useless initialization, just t… in FSE_buildCTable_wksp()
108 cumul[maxSymbolValue+1] = tableSize+1; in FSE_buildCTable_wksp()
128 { U32 u; for (u=0; u<tableSize; u++) { in FSE_buildCTable_wksp()
130 …tableU16[cumul[s]++] = (U16) (tableSize+u); /* TableU16 : sorted by symbol order; gives next sta… in FSE_buildCTable_wksp()
205 const int tableSize = 1 << tableLog; in FSE_writeNCount_generic() local
[all …]
/external/zstd/programs/
Dutil.c407 UTIL_assembleFileNamesTable2(const char** filenames, size_t tableSize, size_t tableCapacity, char* … in UTIL_assembleFileNamesTable2() argument
413 table->tableSize = tableSize; in UTIL_assembleFileNamesTable2()
419 UTIL_assembleFileNamesTable(const char** filenames, size_t tableSize, char* buf) in UTIL_assembleFileNamesTable() argument
421 return UTIL_assembleFileNamesTable2(filenames, tableSize, tableSize, buf); in UTIL_assembleFileNamesTable()
432 FileNamesTable* UTIL_allocateFileNamesTable(size_t tableSize) in UTIL_allocateFileNamesTable() argument
434 const char** const fnTable = (const char**)malloc(tableSize * sizeof(*fnTable)); in UTIL_allocateFileNamesTable()
437 fnt = UTIL_assembleFileNamesTable(fnTable, tableSize, NULL); in UTIL_allocateFileNamesTable()
438 fnt->tableSize = 0; /* the table is empty */ in UTIL_allocateFileNamesTable()
444 assert(fnt->tableSize < fnt->tableCapacity); in UTIL_refFilename()
445 fnt->fileNames[fnt->tableSize] = filename; in UTIL_refFilename()
[all …]
Dzstdcli.c1112 unsigned const nbFilenames = (unsigned)filenames->tableSize; in main()
1123 filenames->tableSize = fileNamesNb; in main()
1127 if (file_of_names->tableSize) { in main()
1128 size_t const nbFileLists = file_of_names->tableSize; in main()
1149 …int const ret = FIO_listMultipleFiles((unsigned)filenames->tableSize, filenames->fileNames, g_disp… in main()
1180 if (filenames->tableSize > 0) { in main()
1183 for(i = 0; i < filenames->tableSize; i++) { in main()
1191 …BMK_benchFilesAdvanced(filenames->fileNames, (unsigned)filenames->tableSize, dictFileName, cLevel,… in main()
1215 …es(outFileName, maxDictSize, filenames->fileNames, (unsigned)filenames->tableSize, blockSize, NULL… in main()
1220 …es(outFileName, maxDictSize, filenames->fileNames, (unsigned)filenames->tableSize, blockSize, NULL… in main()
[all …]
Dutil.h186 size_t tableSize; /* nb of fileNames */ member
206 UTIL_assembleFileNamesTable(const char** filenames, size_t tableSize, char* buf);
243 FileNamesTable* UTIL_allocateFileNamesTable(size_t tableSize);
/external/guava/android/guava/src/com/google/common/base/
DSmallCharMatcher.java79 int tableSize = Integer.highestOneBit(setSize - 1) << 1; in chooseTableSize() local
80 while (tableSize * DESIRED_LOAD_FACTOR < setSize) { in chooseTableSize()
81 tableSize <<= 1; in chooseTableSize()
83 return tableSize; in chooseTableSize()
/external/guava/guava/src/com/google/common/base/
DSmallCharMatcher.java79 int tableSize = Integer.highestOneBit(setSize - 1) << 1; in chooseTableSize() local
80 while (tableSize * DESIRED_LOAD_FACTOR < setSize) { in chooseTableSize()
81 tableSize <<= 1; in chooseTableSize()
83 return tableSize; in chooseTableSize()
/external/oss-fuzz/projects/giflib/
DProtoToGif.cpp69 uint32_t tableSize = min((uint32_t)gct.colors().size(), tableExpToTableSize(m_globalColorExp)); in visit() local
70 m_output.write(gct.colors().data(), tableSize); in visit()
124 uint32_t tableSize = min((uint32_t)lct.colors().size(), tableExpToTableSize(m_localColorExp)); in visit() local
125 m_output.write(lct.colors().data(), tableSize); in visit()
271 uint32_t tableSize = 3 * (pow(2, tableExp + 1)); in tableExpToTableSize() local
272 return tableSize; in tableExpToTableSize()
/external/zstd/tests/fuzz/
Dregression_driver.c36 assert(numFiles == files->tableSize); in main()
43 if (files->tableSize == 0) in main()
45 for (i = 0; i < files->tableSize; ++i) { in main()
/external/aac/libMpegTPEnc/include/
Dtp_data.h421 UINT tableSize = (1 << nBits) - 1; in getSamplingRateIndex() local
423 for (sf_index = 0; sf_index < tableSize; sf_index++) { in getSamplingRateIndex()
427 if (sf_index > tableSize) { in getSamplingRateIndex()
428 return tableSize - 1; in getSamplingRateIndex()
/external/aac/libMpegTPDec/include/
Dtp_data.h421 UINT tableSize = (1 << nBits) - 1; in getSamplingRateIndex() local
423 for (sf_index = 0; sf_index < tableSize; sf_index++) { in getSamplingRateIndex()
427 if (sf_index > tableSize) { in getSamplingRateIndex()
428 return tableSize - 1; in getSamplingRateIndex()
/external/mesa3d/src/util/
Dxmlconfig.c258 uint32_t size = 1 << cache->tableSize, mask = size - 1; in findOption()
266 hash = (hash >> (16-cache->tableSize/2)) & mask; in findOption()
319 info->tableSize = 6; in driParseOptionInfo()
320 info->info = calloc(1 << info->tableSize, sizeof(driOptionInfo)); in driParseOptionInfo()
321 info->values = calloc(1 << info->tableSize, sizeof(driOptionValue)); in driParseOptionInfo()
1015 unsigned i, size = 1 << info->tableSize; in initOptionCache()
1017 cache->tableSize = info->tableSize; in initOptionCache()
1018 cache->values = malloc((1<<info->tableSize) * sizeof(driOptionValue)); in initOptionCache()
1024 (1<<info->tableSize) * sizeof(driOptionValue)); in initOptionCache()
1079 uint32_t i, size = 1 << info->tableSize; in driDestroyOptionInfo()
[all …]

1234