17 writes to _rgu
System.Numerics (17)
System\Numerics\BigIntegerBuilder.cs (17)
66
_rgu
= null;
77
_rgu
= new uint[cuAlloc];
81
_rgu
= null;
89
_rgu
= bn._Bits;
107
_rgu
= bn._Bits;
144
_rgu
= new uint[1] { _uSmall };
148
_rgu
= new uint[1] { _uSmall };
176
_rgu
= bits;
257
_rgu
= new uint[cu];
275
_rgu
= new uint[cu];
303
_rgu
= rgu;
331
_rgu
= rgu;
348
_rgu
= rgu;
375
_rgu
= new uint[reg._iuLast + 1 + cuExtra];
943
_rgu
= new uint[_iuLast + 1];
989
_rgu
= new uint[iuLastNew + 1];
1038
Array.Resize(ref
_rgu
, _iuLast + 2);
134 references to _rgu
System.Numerics (134)
System\Numerics\BigIntegerBuilder.cs (134)
42
Contract.Assert(!_fWritable ||
_rgu
!= null);
45
Contract.Assert(
_rgu
!= null &&
_rgu
.Length > _iuLast);
46
Contract.Assert(!fTrimmed ||
_rgu
[_iuLast] != 0);
90
if (
_rgu
== null) {
95
_iuLast =
_rgu
.Length - 1;
96
_uSmall =
_rgu
[0];
97
while (_iuLast > 0 &&
_rgu
[_iuLast] == 0)
111
if (
_rgu
== null) {
116
_iuLast =
_rgu
.Length - 1;
117
_uSmall =
_rgu
[0];
118
while (_iuLast > 0 &&
_rgu
[_iuLast] == 0)
143
if (
_rgu
== null)
146
_rgu
[0] = _uSmall;
147
else if (
_rgu
[0] != _uSmall)
154
int cuExtra =
_rgu
.Length - _iuLast - 1;
157
if (cuExtra == 0 ||
_rgu
[_iuLast + 1] == 0) {
159
bits =
_rgu
;
163
_rgu
[_iuLast + 1] = 0;
165
bits =
_rgu
;
173
bits =
_rgu
;
193
_rgu
[0] = (uint)uu;
194
_rgu
[1] = uHi;
201
public uint High { get { return _iuLast == 0 ? _uSmall :
_rgu
[_iuLast]; } }
213
man = NumericsHelpers.MakeUlong(
_rgu
[cuLeft + 1],
_rgu
[cuLeft]);
217
if (cuLeft > 0 && (cbit = NumericsHelpers.CbitHighZero(
_rgu
[cuLeft + 1])) > 0) {
220
man = (man << cbit) | (
_rgu
[cuLeft - 1] >> (kcbitUint - cbit));
227
if (_iuLast > 0 &&
_rgu
[_iuLast] == 0) {
228
_uSmall =
_rgu
[0];
229
while (--_iuLast > 0 &&
_rgu
[_iuLast] == 0)
240
if (
_rgu
[iu] != 0)
256
if (!_fWritable ||
_rgu
.Length < cu) {
274
if (!_fWritable ||
_rgu
.Length < cu) {
279
Array.Clear(
_rgu
, 0, cu);
293
_uSmall =
_rgu
[0];
297
if (!_fWritable ||
_rgu
.Length < cu) {
302
Array.Copy(
_rgu
, rgu, Math.Min(cu, _iuLast + 1));
307
Array.Clear(
_rgu
, _iuLast + 1, cu - _iuLast - 1);
309
_rgu
[0] = _uSmall;
322
if (_fWritable &&
_rgu
.Length >= cu)
329
Array.Copy(
_rgu
, rgu, _iuLast + 1);
347
Array.Copy(
_rgu
, rgu, _iuLast + 1);
374
if (!_fWritable ||
_rgu
.Length <= reg._iuLast) {
379
Array.Copy(reg.
_rgu
,
_rgu
, _iuLast + 1);
390
_rgu
[0] = _uSmall;
391
_rgu
[1] = 1;
398
uint uNew =
_rgu
[0] + u;
406
_rgu
[0] = uNew;
434
Array.Copy(reg.
_rgu
, _iuLast + 1,
_rgu
, _iuLast + 1, reg._iuLast - _iuLast);
442
uCarry = AddCarry(ref
_rgu
[iu], reg.
_rgu
[iu], uCarry);
471
uint uTmp =
_rgu
[0];
472
_rgu
[0] = uTmp - u;
510
_iuLast = BigInteger.GetDiffLength(
_rgu
, reg.
_rgu
, _iuLast + 1) - 1;
517
uint u1 =
_rgu
[_iuLast];
518
uint u2 = reg.
_rgu
[_iuLast];
547
uBorrow = SubBorrow(ref
_rgu
[iu], reg.
_rgu
[iu], uBorrow);
561
Contract.Assert(_iuLast < reg._iuLast ||
_rgu
[_iuLast] < reg.
_rgu
[_iuLast]);
567
Array.Copy(reg.
_rgu
, _iuLast + 1,
_rgu
, _iuLast + 1, reg._iuLast - _iuLast);
574
uBorrow = SubRevBorrow(ref
_rgu
[iu], reg.
_rgu
[iu], uBorrow);
601
uCarry = MulCarry(ref
_rgu
[iu], u, uCarry);
605
_rgu
[_iuLast] = uCarry;
630
uint uMul =
_rgu
[iu];
631
_rgu
[iu] = 0;
634
uCarry = AddMulCarry(ref
_rgu
[iu + iuSrc], regMul.
_rgu
[iuSrc], uMul, uCarry);
637
uCarry = AddCarry(ref
_rgu
[iuDst], 0, uCarry);
640
_rgu
[_iuLast] = uCarry;
677
rgu1 = reg1.
_rgu
; cu1 = reg1._iuLast + 1;
678
rgu2 = reg2.
_rgu
; cu2 = reg2._iuLast + 1;
681
rgu1 = reg2.
_rgu
; cu1 = reg2._iuLast + 1;
682
rgu2 = reg1.
_rgu
; cu2 = reg1._iuLast + 1;
693
uCarry = AddMulCarry(ref
_rgu
[iuRes], uCur, rgu2[iu2], uCarry);
695
uCarry = AddCarry(ref
_rgu
[iuRes++], 0, uCarry);
717
uu = NumericsHelpers.MakeUlong((uint)uu,
_rgu
[iv]);
718
_rgu
[iv] = (uint)(uu / uDen);
736
uu = NumericsHelpers.MakeUlong((uint)uu, regNum.
_rgu
[iv]);
808
if (regDen.
_rgu
[iu - cuDiff] != regNum.
_rgu
[iu]) {
809
if (regDen.
_rgu
[iu - cuDiff] < regNum.
_rgu
[iu])
822
uint uDen = regDen.
_rgu
[cuDen - 1];
823
uint uDenNext = regDen.
_rgu
[cuDen - 2];
830
uDenNext |= regDen.
_rgu
[cuDen - 3] >> cbitShiftRight;
840
uint uNumHi = (iu + cuDen <= regNum._iuLast) ? regNum.
_rgu
[iu + cuDen] : 0;
841
Contract.Assert(uNumHi <= regDen.
_rgu
[cuDen - 1]);
843
ulong uuNum = NumericsHelpers.MakeUlong(uNumHi, regNum.
_rgu
[iu + cuDen - 1]);
844
uint uNumNext = regNum.
_rgu
[iu + cuDen - 2];
849
uNumNext |= regNum.
_rgu
[iu + cuDen - 3] >> cbitShiftRight;
870
uuBorrow += regDen.
_rgu
[iu2] * uuQuo;
873
if (regNum.
_rgu
[iu + iu2] < uSub)
875
regNum.
_rgu
[iu + iu2] -= uSub;
883
uCarry = AddCarry(ref regNum.
_rgu
[iu + iu2], regDen.
_rgu
[iu2], uCarry);
896
regQuo.
_rgu
[iu] = (uint)uuQuo;
935
uint[] rguSrc =
_rgu
;
941
Contract.Assert(
_rgu
.Length > _iuLast);
948
_rgu
[iuDst] = (rguSrc[iuSrc - 1] >> cbitShift) | (rguSrc[iuSrc] << (kcbitUint - cbitShift));
949
_rgu
[_iuLast] = rguSrc[cuSrc - 1] >> cbitShift;
953
Array.Copy(rguSrc, cuShift,
_rgu
, 0, _iuLast + 1);
986
uint[] rguSrc =
_rgu
;
988
if (!_fWritable ||
_rgu
.Length <= iuLastNew) {
995
_rgu
[cuShift + 1] = uHigh;
996
_rgu
[cuShift] = _uSmall << cbitShift;
999
Array.Copy(rguSrc, 0,
_rgu
, cuShift, _iuLast + 1);
1004
_rgu
[iuLastNew] = uHigh;
1006
_rgu
[iuDst] = (rguSrc[iuSrc] << cbitShift) | (rguSrc[iuSrc - 1] >> (kcbitUint - cbitShift));
1007
_rgu
[cuShift] = rguSrc[0] << cbitShift;
1011
Array.Clear(
_rgu
, 0, cuShift);
1022
return NumericsHelpers.MakeUlong(
_rgu
[cu - 1],
_rgu
[cu - 2]);
1024
return
_rgu
[cu - 2];
1037
if (_iuLast + 1 ==
_rgu
.Length)
1039
_rgu
[++_iuLast] = 1;
1042
if (++
_rgu
[iu] > 0)
1054
uint u =
_rgu
[iu]--;
1097
if (reg1._iuLast > 0 && reg1.
_rgu
[0] == 0 || reg2._iuLast > 0 && reg2.
_rgu
[0] == 0) {
1157
uu1 = (uu1 << cbit) | (reg1.
_rgu
[cuMax - 3] >> (kcbitUint - cbit));
1159
uu2 = (uu2 << cbit) | (reg2.
_rgu
[cuMax - 3] >> (kcbitUint - cbit));
1289
uint u1 = reg1.
_rgu
[iu];
1290
uint u2 = reg2.
_rgu
[iu];
1295
reg1.
_rgu
[iu] = (uint)nn1;
1296
reg2.
_rgu
[iu] = (uint)nn2;
1313
while (
_rgu
[iuMin] == 0)
1315
int cbit = NumericsHelpers.CbitLowZero(
_rgu
[iuMin]);