예제 #1
0
파일: CudaStream.cs 프로젝트: killop/ILGPU
 /// <summary cref="DisposeBase.Dispose(bool)"/>
 protected override void Dispose(bool disposing)
 {
     if (responsibleForHandle && streamPtr != IntPtr.Zero)
     {
         CudaException.ThrowIfFailed(
             CurrentAPI.DestroyStream(streamPtr));
         streamPtr = IntPtr.Zero;
     }
     base.Dispose(disposing);
 }
예제 #2
0
파일: CudaStream.cs 프로젝트: m4rs-mt/ILGPU
        /// <summary>
        /// Disposes this Cuda stream.
        /// </summary>
        protected override void DisposeAcceleratorObject(bool disposing)
        {
            if (!responsibleForHandle || streamPtr == IntPtr.Zero)
            {
                return;
            }

            CudaException.VerifyDisposed(
                disposing,
                CurrentAPI.DestroyStream(streamPtr));
            streamPtr = IntPtr.Zero;
        }