internal void Register(GpuVector vector) { if (_allocationLayer.Any()) { var layer = _allocationLayer.Peek(); if (layer != null) { layer.Add(vector); } } }
public IReadOnlyList <IVector> Split(int blockCount) { Debug.Assert(IsValid); var blockSize = Count / blockCount; return(Enumerable.Range(0, blockCount).Select(i => { var ptr2 = _cuda.OffsetByBlock(_data, i, blockSize); var vector = new GpuVector(_cuda, ptr2, false); return vector; }).ToList()); }
public void Add(GpuVector vector) { _vector.Add(vector); }