Lines Matching defs:Amount
145 void Distribution::add(const BlockNode &Node, uint64_t Amount,
147 assert(Amount && "invalid weight of 0");
148 uint64_t NewTotal = Total + Amount;
159 Weights.push_back(Weight(Type, Node, Amount));
164 if (!W.Amount) {
170 assert(OtherW.Amount && "Expected non-zero weight");
171 if (W.Amount > W.Amount + OtherW.Amount)
173 W.Amount = UINT64_MAX;
175 W.Amount += OtherW.Amount;
248 Weights.front().Amount = 1;
268 return Sum + W.Amount;
283 W.Amount = std::max(UINT64_C(1), shiftRightAndRound(W.Amount, Shift));
284 assert(W.Amount <= UINT32_MAX);
287 Total += W.Amount;
458 BlockMass Taken = D.takeMass(W.Amount);
842 BlockMass Taken = D.takeMass(W.Amount);
853 BlockMass Taken = D.takeMass(W.Amount);