/// <summary> /// Creates a custom plan. /// </summary> /// <param name="plan">Filled in with the created plan.</param> /// <param name="rank">The transform.</param> /// <param name="n">The transform dimensions.</param> /// <param name="inembed">The storage dimensions of the input data.</param> /// <param name="istride">The stride of the input data.</param> /// <param name="idist">The distance of the input data.</param> /// <param name="onembed">The storage dimensions of the output data.</param> /// <param name="ostride">The stride of the output data.</param> /// <param name="odist">The distance of the output data.</param> /// <param name="type">The transform type.</param> /// <param name="batch">The number of transforms.</param> /// <returns>The error code.</returns> public CuFFTResult PlanMany( out CuFFTPlan plan, int rank, int[] n, int[] inembed, int istride, int idist, int[] onembed, int ostride, int odist, CuFFTType type, int batch) { var errorCode = API.PlanMany( out var planHandle, rank, n, inembed, istride, idist, onembed, ostride, odist, type, batch); plan = errorCode == CuFFTResult.CUFFT_SUCCESS ? new CuFFTPlan(API, planHandle) : default; return(errorCode); }
/// <summary> /// Creates a 2D plan. /// </summary> /// <param name="plan">Filled in with the created plan.</param> /// <param name="nx">The transform size in the x dimension.</param> /// <param name="ny">The transform size in the y dimension.</param> /// <param name="type">The transform type.</param> /// <returns>The error code.</returns> public CuFFTResult Plan2D(out CuFFTPlan plan, int nx, int ny, CuFFTType type) { var errorCode = API.Plan2D(out var planHandle, nx, ny, type); plan = errorCode == CuFFTResult.CUFFT_SUCCESS ? new CuFFTPlan(API, planHandle) : default; return(errorCode); }
/// <summary> /// Creates an extensible plan. /// </summary> public CuFFTResult CreatePlan(out CuFFTPlan plan) { var errorCode = API.Create(out var planHandle); plan = errorCode == CuFFTResult.CUFFT_SUCCESS ? new CuFFTPlan(API, planHandle) : default; return(errorCode); }