Ejemplo n.º 1
0
 public PtrToMemory(CudaContext context, IDeviceMemoryPtr rootBlock, CUdeviceptr ptr, SizeT size)
 {
     _context   = context;
     _ptr       = new CudaDeviceVariable <float>(ptr, size);
     _rootBlock = rootBlock;
     rootBlock.AddRef();
 }
Ejemplo n.º 2
0
 public int AddRef()
 {
     return(Interlocked.Increment(ref refCount) + _rootBlock.AddRef());
 }