Esempio 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();
 }
Esempio n. 2
0
 public int AddRef()
 {
     return(Interlocked.Increment(ref refCount) + _rootBlock.AddRef());
 }