Home | History | Annotate | Download | only in CodeGen

Lines Matching refs:Sum

33   // First we compute the sum with 64-bits of precision, ensuring that cannot
37 uint64_t Sum = 0;
42 Sum += Weight;
45 // If the computed sum fits in 32-bits, we're done.
46 if (Sum <= UINT32_MAX)
47 return Sum;
50 // re-sum with that scale applied.
51 assert((Sum / UINT32_MAX) < UINT32_MAX);
52 Scale = (Sum / UINT32_MAX) + 1;
53 Sum = 0;
57 Sum += Weight / Scale;
59 assert(Sum <= UINT32_MAX);
60 return Sum;