예제 #1
0
 /// <inheritdoc />
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         CuFFTException.ThrowIfFailed(
             API.Destroy(PlanHandle));
         PlanHandle = IntPtr.Zero;
     }
     base.Dispose(disposing);
 }
예제 #2
0
 /// <summary>
 /// Overrides the work area associated with a plan.
 /// </summary>
 public void SetWorkArea(ArrayView <byte> workArea) =>
 CuFFTException.ThrowIfFailed(
     API.SetWorkArea(PlanHandle, workArea));
예제 #3
0
 /// <summary>
 /// Indicates whether to allocate work area.
 /// </summary>
 public void SetAutoAllocate(bool autoAllocate) =>
 CuFFTException.ThrowIfFailed(
     API.SetAutoAllocation(PlanHandle, autoAllocate ? 1 : 0));
예제 #4
0
 /// <summary>
 /// Associates a CUDA stream with a cuFFT plan.
 /// </summary>
 public void SetStream(CudaStream cudaStream)
 {
     CuFFTException.ThrowIfFailed(
         API.SetStream(PlanHandle, cudaStream));
 }
예제 #5
0
 /// <summary>
 /// Returns the work size.
 /// </summary>
 /// <param name="workSize">Populated with the estimated size in bytes.</param>
 public void GetSize(UIntPtr[] workSize) =>
 CuFFTException.ThrowIfFailed(
     API.GetSize(
         PlanHandle,
         workSize));