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