85 references to _blocks
System.Private.CoreLib (85)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.BigInteger.cs (85)
346ulong sum = carry + large._blocks[largeIndex] + small._blocks[smallIndex]; 348result._blocks[resultIndex] = (uint)sum; 358ulong sum = carry + large._blocks[largeIndex]; 360result._blocks[resultIndex] = (uint)sum; 385result._blocks[resultIndex] = 1; 413long delta = (long)lhs._blocks[index] - rhs._blocks[index]; 445return (lastIndex * BitsPerBlock) + CountSignificantBits(value._blocks[lastIndex]); 469(uint quotient, uint remainder) = Math.DivRem(lhs._blocks[0], rhs._blocks[0]); 481ulong rhsValue = rhs._blocks[0]; 486ulong value = (carry << 32) | lhs._blocks[i]; 496quo._blocks[i] = (uint)digit; 523uint divHi = rhs._blocks[rhsLength - 1]; 524uint divLo = rhs._blocks[rhsLength - 2]; 538divLo |= rhs._blocks[rhsLength - 3] >> shiftRight; 547uint t = i < lhsLength ? rem._blocks[i] : 0; 549ulong valHi = ((ulong)t << 32) | rem._blocks[i - 1]; 550uint valLo = i > 1 ? rem._blocks[i - 2] : 0; 560valLo |= rem._blocks[i - 3] >> shiftRight; 611quo._blocks[n] = (uint)digit; 627if (rem._blocks[i] == 0) 655uint quotient = dividend._blocks[lastIndex] / (divisor._blocks[lastIndex] + 1); 668ulong product = ((ulong)divisor._blocks[index] * quotient) + carry; 671ulong difference = (ulong)dividend._blocks[index] - (uint)product - borrow; 674dividend._blocks[index] = (uint)difference; 681while ((divisorLength > 0) && (dividend._blocks[divisorLength - 1] == 0)) 701ulong difference = (ulong)dividend._blocks[index] - divisor._blocks[index] - borrow; 704dividend._blocks[index] = (uint)difference; 711while ((divisorLength > 0) && (dividend._blocks[divisorLength - 1] == 0)) 751ulong product = ((ulong)lhs._blocks[index] * value) + carry; 752result._blocks[index] = (uint)product; 774result._blocks[index] = carry; 835if (small._blocks[smallIndex] != 0) 844ulong product = result._blocks[resultIndex] + ((ulong)small._blocks[smallIndex] * large._blocks[largeIndex]) + carry; 846result._blocks[resultIndex] = (uint)product; 853result._blocks[resultIndex] = (uint)carry; 860if ((maxResultLength > 0) && (result._blocks[maxResultLength - 1] == 0)) 889result._blocks[blocksToShift] = 1U << remainingBitsToShift; 978ref uint lhsValue = ref lhs._blocks[lhsStartIndex + i]; 980ulong digit = lhsValue + carry + rhs._blocks[i]; 1035carry += rhs._blocks[i] * q; 1039ref uint lhsValue = ref lhs._blocks[lhsStartIndex + i]; 1061_blocks[0] += value; 1062if (_blocks[0] >= value) 1070_blocks[index]++; 1071if (_blocks[index] > 0) 1090_blocks[length] = 1; 1097return _blocks[index]; 1141ulong block = _blocks[index]; 1144_blocks[index] = (uint)product; 1163_blocks[index] = (uint)carry; 1191result._blocks[0] = value; 1206result._blocks[0] = (uint)value; 1207result._blocks[1] = (uint)(value >> 32); 1219Buffer.Memmove(ref result._blocks[0], ref value._blocks[0], (nuint)rhsLength); 1263_blocks[writeIndex] = _blocks[readIndex]; 1297uint block = _blocks[readIndex]; 1302_blocks[writeIndex] = highBits | lowBits; 1308block = _blocks[readIndex]; 1313_blocks[writeIndex] = highBits | lowBits; 1314_blocks[writeIndex - 1] = block << remainingBitsToShift; 1320if (_blocks[_length - 1] == 0) 1331return _blocks[0]; 1341return ((ulong)_blocks[1] << 32) + _blocks[0]; 1346return _blocks[0]; 1356return new UInt128(((ulong)_blocks[3] << 32) + _blocks[2], ((ulong)(_blocks[1]) << 32) + _blocks[0]); 1361return new UInt128((ulong)_blocks[2], ((ulong)_blocks[1] << 32) + _blocks[0]); 1366return ((ulong)(_blocks[1]) << 32) + _blocks[0]; 1371return _blocks[0]; 1377private void Clear(int length) => ((Span<uint>)_blocks).Slice(0, length).Clear();