8 writes to _count
Microsoft.ML.Data (8)
Data\BufferBuilder.cs (8)
113
_count
= 0;
124
_count
= _length;
187
_count
++;
217
_count
++;
252
_count
++;
275
_count
= 0;
305
_count
= ivDst;
340
_count
= _length;
40 references to _count
Microsoft.ML.Data (40)
Data\BufferBuilder.cs (40)
53
public bool IsEmpty =>
_count
== 0;
73
Contracts.Assert(
_count
>= 0);
75
Contracts.Assert(_values.Length >=
_count
);
79
Contracts.Assert(
_count
== _length);
84
Contracts.Assert(Utils.Size(_indices) >=
_count
);
87
Contracts.Assert(_sorted ||
_count
> InsertThreshold);
177
if (
_count
< _length)
180
if (_values.Length <=
_count
)
181
Array.Resize(ref _values, Math.Max(Math.Min(_length, checked(
_count
* 2)), 8));
182
if (_indices.Length <=
_count
)
183
Array.Resize(ref _indices, Math.Max(Math.Min(_length, checked(
_count
* 2)), 8));
185
_values[
_count
] = value;
186
_indices[
_count
] = index;
200
if (
_count
>= _length / 2 - 1)
208
if (_values.Length <=
_count
)
209
Array.Resize(ref _values, Math.Max(Math.Min(_length, checked(
_count
* 2)), 8));
210
if (_indices.Length <=
_count
)
211
Array.Resize(ref _indices, Math.Max(Math.Min(_length, checked(
_count
* 2)), 8));
213
if (
_count
>= InsertThreshold && _indices[
_count
- InsertThreshold] > index)
215
_values[
_count
] = value;
216
_indices[
_count
] = index;
224
int ivDst =
_count
;
242
Contracts.Assert(ivDst ==
_count
|| _indices[ivDst] > index);
245
for (int i =
_count
; --i >= ivDst;)
264
Contracts.Assert(
_count
> 1);
267
Array.Sort(_indices, _values, 0,
_count
);
273
if (ivSrc >=
_count
)
283
Contracts.Assert(ivSrc <
_count
&& !_comb.IsDefault(_values[ivSrc]));
287
while (++ivSrc <
_count
)
304
Contracts.Assert(0 < ivDst && ivDst <=
_count
);
309
if (
_count
>= _length / 2)
326
int iivSrc =
_count
;
370
int iv = Utils.FindIndexSorted(_indices, 0,
_count
, ifeat);
373
if (iv <
_count
)
447
if (!_dense &&
_count
>= _length / 2)
459
Contracts.Assert(
_count
< _length);
460
var editor = VBufferEditor.Create(ref buffer, _length,
_count
);
461
_values.AsSpan(0,
_count
).CopyTo(editor.Values);
462
_indices.AsSpan(0,
_count
).CopyTo(editor.Indices);