Lines Matching refs:Amount
101 void Distribution::add(const BlockNode &Node, uint64_t Amount,
103 assert(Amount && "invalid weight of 0");
104 uint64_t NewTotal = Total + Amount;
115 Weights.push_back(Weight(Type, Node, Amount));
120 if (!W.Amount) {
126 assert(OtherW.Amount && "Expected non-zero weight");
127 if (W.Amount > W.Amount + OtherW.Amount)
129 W.Amount = UINT64_MAX;
131 W.Amount += OtherW.Amount;
199 Weights.front().Amount = 1;
219 return Sum + W.Amount;
234 W.Amount = std::max(UINT64_C(1), shiftRightAndRound(W.Amount, Shift));
235 assert(W.Amount <= UINT32_MAX);
238 Total += W.Amount;
402 BlockMass Taken = D.takeMass(W.Amount);