Exemplo n.º 1
0
 internal void Register(GpuVector vector)
 {
     if (_allocationLayer.Any())
     {
         var layer = _allocationLayer.Peek();
         if (layer != null)
         {
             layer.Add(vector);
         }
     }
 }
Exemplo n.º 2
0
        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());
        }
Exemplo n.º 3
0
 public void Add(GpuVector vector)
 {
     _vector.Add(vector);
 }