Lines Matching refs:UInt32

34 #define kMtHashBlockSize ((UInt32)1 << 17)

39 #define kMtBtBlockSize ((UInt32)1 << 16)
63 UInt32 temp = MF_CRC[cur[0]] ^ cur[1]; \
65 h3 = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); }
69 UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
70 h3 = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); }
73 UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
75 temp ^= ((UInt32)cur[2] << 8); \
120 static UInt32 MtSync_GetNextBlock(CMtSync *p)
122 UInt32 numBlocks = 0;
228 static SRes MtSync_Init(CMtSync *p, UInt32 numBlocks)
291 #define GetUi24hi_from32(p) ((UInt32)GetUi32(p) >> 8)
293 #define GetUi24hi_from32(p) ((p)[1] ^ ((UInt32)(p)[2] << 8) ^ ((UInt32)(p)[3] << 16))
297 static void GetHeads ## name(const Byte *p, UInt32 pos, \
298 UInt32 *hash, UInt32 hashMask, UInt32 *heads, UInt32 numHeads, const UInt32 *crc)
302 const UInt32 value = (v); \
315 DEF_GetHeads2(3b, GetUi16(p) ^ ((UInt32)(p)[2] << 16), UNUSED_VAR(hashMask); UNUSED_VAR(crc); )
330 UInt32 v1 = GetUi32(p);
331 UInt32 v0 = v1 & 0xFFFFFF;
332 UInt32 h0, h1;
341 UInt32 v0 = GetUi16(p) ^ ((UInt32)(p)[2] << 16);
370 UInt32 crc0[256];
371 UInt32 crc1[256];
376 UInt32 v = crc[i];
382 GetHeads_LOOP(crc0[p[0]] ^ crc1[p[3]] ^ (UInt32)GetUi16(p+1))
387 UInt32 crc0[256];
398 UInt32 crc0[256];
399 UInt32 crc1[256];
400 UInt32 crc2[256];
405 UInt32 v = crc[i];
411 GetHeads_LOOP(crc0[p[0]] ^ crc1[p[3]] ^ crc2[p[4]] ^ (UInt32)GetUi16(p+1))
416 UInt32 crc0[256];
417 UInt32 crc1[256];
422 UInt32 v = crc[i];
432 DEF_GetHeads(4, (crc[p[0]] ^ (crc[p[3]] << kLzHash_CrcShift_1) ^ (UInt32)GetUi16(p+1)) & hashMask)
434 DEF_GetHeads(5, (crc[p[0]] ^ (crc[p[3]] << kLzHash_CrcShift_1) ^ (crc[p[4]] << kLzHash_CrcShift_2) ^ (UInt32)GetUi16(p + 1)) & hashMask)
447 UInt32 blockIndex = 0;
493 UInt32 *heads = mt->hashBuf + GET_HASH_BLOCK_OFFSET(blockIndex++);
494 UInt32 num = Inline_MatchFinder_GetNumAvailableBytes(mf);
519 if (mf->pos > (UInt32)kMtMaxValForNormalize - num)
521 const UInt32 subValue = (mf->pos - mf->historySize - 1); // & ~(UInt32)(kNormalizeAlign - 1);
558 we use size_t for (pos) instead of UInt32
563 UInt32 * Z7_FASTCALL GetMatchesSpecN_2(const Byte *lenLimit, size_t pos, const Byte *cur, CLzRef *son,
564 UInt32 _cutValue, UInt32 *d, size_t _maxLen, const UInt32 *hash, const UInt32 *limit, const UInt32 *size,
565 size_t _cyclicBufferPos, UInt32 _cyclicBufferSize,
566 UInt32 *posRes);
571 static void BtGetMatches(CMatchFinderMt *p, UInt32 *d)
573 UInt32 numProcessed = 0;
574 UInt32 curPos = 2;
580 UInt32 reserve = (p->matchMaxLen * 2);
581 const UInt32 kNumHashBytes_Max = 5; // BT_HASH_BYTES_MAX
584 const UInt32 limit = kMtBtBlockSize - (reserve);
587 const UInt32 limit = kMtBtBlockSize - (p->matchMaxLen * 2);
604 UInt32 avail;
606 const UInt32 bi = MtSync_GetNextBlock(&p->hashSync);
607 const UInt32 k = GET_HASH_BLOCK_OFFSET(bi);
608 const UInt32 *h = p->hashBuf + k;
616 /* we must prevent UInt32 overflow for avail total value,
618 UInt32 availSum = numProcessed + avail;
620 availSum = (UInt32)(Int32)-1;
645 UInt32 size = p->hashBufPosLimit - p->hashBufPos;
646 UInt32 pos = p->pos;
647 UInt32 cyclicBufferPos = p->cyclicBufferPos;
648 UInt32 lenLimit = p->matchMaxLen;
652 UInt32 size2 = p->hashNumAvail - lenLimit + 1;
660 if (pos > (UInt32)kMtMaxValForNormalize - size)
662 const UInt32 subValue = (pos - p->cyclicBufferSize); // & ~(UInt32)(kNormalizeAlign - 1);
671 UInt32 *startDistances = d + curPos;
672 UInt32 num = (UInt32)(GetMatchesSpec1(lenLimit, pos - p->hashBuf[p->hashBufPos++],
683 UInt32 posRes = pos;
684 const UInt32 *d_end;
705 curPos = (UInt32)(d_end - d);
707 const UInt32 processed = posRes - pos;
717 const UInt32 processed = pos - p->pos;
732 static void BtFillBlock(CMatchFinderMt *p, UInt32 globalBlockIndex)
758 UInt32 blockIndex = 0;
821 (UInt32)(g_NumIters_Tree / 1000),
822 (UInt32)(((UInt64)g_NumIters_Loop * 1000) / (g_NumIters_Tree + 1)),
823 (UInt32)(g_NumIters_Loop / 1000),
824 (UInt32)(g_NumIters_Bytes / 1000)
848 SRes MatchFinderMt_Create(CMatchFinderMt *p, UInt32 historySize, UInt32 keepAddBufferBefore,
849 UInt32 matchMaxLen, UInt32 keepAddBufferAfter, ISzAllocPtr alloc)
857 p->hashBuf = (UInt32 *)ISzAlloc_Alloc(alloc, ((size_t)kHashBufferSize + (size_t)kBtBufferSize) * sizeof(UInt32));
945 static UInt32 MatchFinderMt_GetNextBlock_Bt(CMatchFinderMt *p)
951 const UInt32 bi = MtSync_GetNextBlock(&p->btSync);
952 const UInt32 *bt = p->btBuf + GET_BT_BLOCK_OFFSET(bi);
954 const UInt32 numItems = bt[0];
970 if (p->lzPos >= (UInt32)kMtMaxValForNormalize - (UInt32)kMtBtBlockSize)
974 const UInt32 subValue = (p->lzPos - p->historySize - 1); // & ~(UInt32)(kNormalizeAlign - 1);
993 static UInt32 MatchFinderMt_GetNumAvailableBytes(CMatchFinderMt *p)
1004 static UInt32 * MixMatches2(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *d)
1006 UInt32 h2, c2;
1007 UInt32 *hash = p->hash;
1009 const UInt32 m = p->lzPos;
1028 static UInt32 * MixMatches3(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *d)
1030 UInt32 h2, h3, c2, c3;
1031 UInt32 *hash = p->hash;
1033 const UInt32 m = p->lzPos;
1076 UInt32* MatchFinderMt_GetMatches_Bt4(CMatchFinderMt *p, UInt32 *d)
1078 const UInt32 *bt = p->btBufPos;
1079 const UInt32 len = *bt++;
1080 const UInt32 *btLim = bt + len;
1081 UInt32 matchMinPos;
1082 UInt32 avail = p->btNumAvailBytes - 1;
1101 const UInt32 hs = p->historySize;
1112 UInt32 h2, h3, c2, c3;
1113 UInt32 *hash = p->hash;
1115 UInt32 m = p->lzPos;
1151 const UInt32 v0 = bt[0];
1152 const UInt32 v1 = bt[1];
1166 static UInt32 * MixMatches4(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *d)
1168 UInt32 h2, h3, /* h4, */ c2, c3 /* , c4 */;
1169 UInt32 *hash = p->hash;
1171 const UInt32 m = p->lzPos;
1246 static UInt32 * MatchFinderMt2_GetMatches(CMatchFinderMt *p, UInt32 *d)
1248 const UInt32 *bt = p->btBufPos;
1249 const UInt32 len = *bt++;
1250 const UInt32 *btLim = bt + len;
1257 const UInt32 v0 = bt[0];
1258 const UInt32 v1 = bt[1];
1270 static UInt32 * MatchFinderMt_GetMatches(CMatchFinderMt *p, UInt32 *d)
1272 const UInt32 *bt = p->btBufPos;
1273 UInt32 len = *bt++;
1274 const UInt32 avail = p->btNumAvailBytes - 1;
1282 UInt32 m = p->lzPos;
1301 const UInt32 v0 = bt[0];
1302 const UInt32 v1 = bt[1];
1315 #define SKIP_HEADER_MT(n) SKIP_HEADER2_MT if (p->btNumAvailBytes-- >= (n)) { const Byte *cur = p->pointerToCurPos; UInt32 *hash = p->hash;
1318 static void MatchFinderMt0_Skip(CMatchFinderMt *p, UInt32 num)
1324 static void MatchFinderMt2_Skip(CMatchFinderMt *p, UInt32 num)
1327 UInt32 h2;
1333 static void MatchFinderMt3_Skip(CMatchFinderMt *p, UInt32 num)
1336 UInt32 h2, h3;
1348 static void MatchFinderMt4_Skip(CMatchFinderMt *p, UInt32 num)
1351 UInt32 h2, h3; // h4