Esempio n. 1
0
 /// <inheritdoc />
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         CuFFTException.ThrowIfFailed(
             API.Destroy(PlanHandle));
         PlanHandle = IntPtr.Zero;
     }
     base.Dispose(disposing);
 }
Esempio n. 2
0
 /// <summary>
 /// Overrides the work area associated with a plan.
 /// </summary>
 public void SetWorkArea(ArrayView <byte> workArea) =>
 CuFFTException.ThrowIfFailed(
     API.SetWorkArea(PlanHandle, workArea));
Esempio n. 3
0
 /// <summary>
 /// Indicates whether to allocate work area.
 /// </summary>
 public void SetAutoAllocate(bool autoAllocate) =>
 CuFFTException.ThrowIfFailed(
     API.SetAutoAllocation(PlanHandle, autoAllocate ? 1 : 0));
Esempio n. 4
0
 /// <summary>
 /// Associates a CUDA stream with a cuFFT plan.
 /// </summary>
 public void SetStream(CudaStream cudaStream)
 {
     CuFFTException.ThrowIfFailed(
         API.SetStream(PlanHandle, cudaStream));
 }
Esempio n. 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));