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