예제 #1
0
 public static extern cufftResult cufftMakePlanMany64(cufftHandle plan,
                                                      int rank,
                                                      [In] long[] n, [In] long[] inembed, [In] long istride, [In] long idist,
                                                      [In] long[] onembed, [In] long ostride, [In] long odist,
                                                      cufftType type,
                                                      long batch,
                                                      ref SizeT workSize);
예제 #2
0
 /// <summary>
 /// Creates a new 2D FFT plan (new API)
 /// </summary>
 /// <param name="handle">cufftHandle object</param>
 /// <param name="nx">The transform size in the X dimension (number of rows)</param>
 /// <param name="ny">The transform size in the Y dimension (number of columns)</param>
 /// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
 /// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
 /// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
 /// <param name="autoAllocate">indicates that the caller intends to allocate and manage
 /// work areas for plans that have been generated.</param>
 public CudaFFTPlan2D(cufftHandle handle, int nx, int ny, cufftType type, CUstream stream, Compatibility mode, bool autoAllocate)
     : this(handle, nx, ny, type)
 {
     SetStream(stream);
     SetCompatibilityMode(mode);
     SetAutoAllocation(autoAllocate);
 }
예제 #3
0
 /// <summary>
 /// Creates a new 1D FFT plan (new API)
 /// </summary>
 /// <param name="handle">cufftHandle object</param>
 /// <param name="nx">The transform size (e.g., 256 for a 256-point FFT)</param>
 /// <param name="type">The transform data type (e.g., C2C for complex to complex)</param>
 /// <param name="batch">Number of transforms of size nx</param>
 /// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
 /// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
 /// <param name="size"></param>
 /// <param name="autoAllocate">indicates that the caller intends to allocate and manage
 /// work areas for plans that have been generated.</param>
 public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, CUstream stream, Compatibility mode, ref SizeT size, bool autoAllocate)
     : this(handle, nx, type, batch, ref size)
 {
     SetStream(stream);
     SetCompatibilityMode(mode);
     SetAutoAllocation(autoAllocate);
 }
예제 #4
0
 public static extern cufftResult cufftMakePlanMany(cufftHandle plan,
                                                    int rank,
                                                    [In] int[] n, [In] int[] inembed, [In] int istride, [In] int idist,
                                                    [In] int[] onembed, [In] int ostride, [In] int odist,
                                                    cufftType type,
                                                    int batch,
                                                    ref SizeT workSize);
예제 #5
0
        /// <summary>
		/// Creates a new 2D FFT plan (old API)
        /// </summary>
        /// <param name="nx">The transform size in the X dimension (number of rows)</param>
        /// <param name="ny">The transform size in the Y dimension (number of columns)</param>
        /// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
        public CudaFFTPlan2D(int nx, int ny, cufftType type)
        {
            _handle = new cufftHandle();
            _nx = nx;
            _ny = ny;
            _type = type;
            res = CudaFFTNativeMethods.cufftPlan2d(ref _handle, nx, ny, type);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cufftPlan2d", res));
            if (res != cufftResult.Success)
                throw new CudaFFTException(res);
        }
예제 #6
0
        //      /// <summary>
        ///// Creates a new 3D FFT plan (old API)
        //      /// </summary>
        //      /// <param name="nx">The transform size in the X dimension</param>
        //      /// <param name="ny">The transform size in the Y dimension</param>
        //      /// <param name="nz">The transform size in the Z dimension</param>
        //      /// <param name="type">The transform data type (e.g., R2C for real to complex)</param>
        //      /// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
        //      public CudaFFTPlan3D(int nx, int ny, int nz, cufftType type, Compatibility mode)
        //          : this(nx, ny, nz, type)
        //      {
        //          SetCompatibilityMode(mode);
        //      }

        //      /// <summary>
        ///// Creates a new 3D FFT plan (old API)
        //      /// </summary>
        //      /// <param name="nx">The transform size in the X dimension</param>
        //      /// <param name="ny">The transform size in the Y dimension</param>
        //      /// <param name="nz">The transform size in the Z dimension</param>
        //      /// <param name="type">The transform data type (e.g., R2C for real to complex)</param>
        //      /// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
        //      /// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
        //      public CudaFFTPlan3D(int nx, int ny, int nz, cufftType type, CUstream stream, Compatibility mode)
        //          : this(nx, ny, nz, type)
        //      {
        //          SetStream(stream);
        //          SetCompatibilityMode(mode);
        //      }

        /// <summary>
        /// Creates a new 3D FFT plan (new API)
        /// </summary>
        /// <param name="handle">cufftHandle object</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="nz">The transform size in the Z dimension</param>
        /// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
        /// <param name="size"></param>
        public CudaFFTPlan3D(cufftHandle handle, int nx, int ny, int nz, cufftType type, ref SizeT size)
        {
            _handle = handle;
            _nx     = nx;
            _type   = type;
            res     = CudaFFTNativeMethods.cufftMakePlan2d(_handle, nx, ny, type, ref size);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cufftMakePlan2d", res));
            if (res != cufftResult.Success)
            {
                throw new CudaFFTException(res);
            }
        }
예제 #7
0
        /// <summary>
        /// During plan execution, CUFFT requires a work area for temporary storage of
        /// intermediate results. This call returns an estimate for the size of the work area required,
        /// given the specified parameters, and assuming default plan settings. Note that changing
        /// some plan settings, such as compatibility mode, may alter the size required for the work
        /// area.
        /// </summary>
        /// <param name="nx">The transform size in the x dimension</param>
        /// <param name="ny">The transform size in the y dimension</param>
        /// <param name="nz">The transform size in the z dimension</param>
        /// <param name="type">The transform data type (e.g., CUFFT_C2C for single
        /// precision complex to complex)</param>
        /// <returns></returns>
        public static SizeT EstimateSize(int nx, int ny, int nz, cufftType type)
        {
            SizeT       size = new SizeT();
            cufftResult res  = CudaFFTNativeMethods.cufftEstimate3d(nx, ny, nz, type, ref size);

            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cufftEstimate3d", res));
            if (res != cufftResult.Success)
            {
                throw new CudaFFTException(res);
            }
            return(size);
        }
예제 #8
0
 /// <summary>
 /// Creates a new 1D FFT plan (old API)
 /// </summary>
 /// <param name="nx">The transform size (e.g., 256 for a 256-point FFT)</param>
 /// <param name="type">The transform data type (e.g., C2C for complex to complex)</param>
 /// <param name="batch">Number of transforms of size nx</param>
 public CudaFFTPlan1D(int nx, cufftType type, int batch)
 {
     _handle = new cufftHandle();
     _nx     = nx;
     _type   = type;
     _batch  = batch;
     res     = CudaFFTNativeMethods.cufftPlan1d(ref _handle, nx, type, batch);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cufftPlan1d", res));
     if (res != cufftResult.Success)
     {
         throw new CudaFFTException(res);
     }
 }
예제 #9
0
 /// <summary>
 /// Creates a new 3D FFT plan (old API)
 /// </summary>
 /// <param name="nx">The transform size in the X dimension</param>
 /// <param name="ny">The transform size in the Y dimension</param>
 /// <param name="nz">The transform size in the Z dimension</param>
 /// <param name="type">The transform data type (e.g., R2C for real to complex)</param>
 public CudaFFTPlan3D(int nx, int ny, int nz, cufftType type)
 {
     _handle = new cufftHandle();
     _nx     = nx;
     _ny     = ny;
     _nz     = nz;
     _type   = type;
     res     = CudaFFTNativeMethods.cufftPlan3d(ref _handle, nx, ny, nz, type);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cufftPlan3d", res));
     if (res != cufftResult.Success)
     {
         throw new CudaFFTException(res);
     }
 }
예제 #10
0
		/// <summary>
		/// Creates a FFT plan configuration of dimension rank, with sizes
		/// specified in the array <c>n</c>. The <c>batch</c> input parameter tells CUFFT how
		/// many transforms to configure in parallel. With this function, batched
		/// plans of any dimension may be created. (new API)
		/// </summary>
		/// <param name="handle">cufftHandle object</param>
		/// <param name="rank">Dimensionality of the transform (1, 2, or 3)</param>
		/// <param name="n">An array of size rank, describing the size of each dimension</param>
		/// <param name="batch">Batch size for this transform</param>
		/// <param name="type">Transform data type (e.g., C2C, as per other CUFFT calls)</param>
		/// <param name="size"></param>
		public CudaFFTPlanMany64(cufftHandle handle, int rank, long[] n, long batch, cufftType type, ref SizeT size)
		{
			_handle = handle;
			_rank = rank;
			_n = n;
			_batch = batch;
			_type = type;

			//optional:
			_inembed = null;
			_istride = 1;
			_idist = 0;
			_onembed = null;
			_ostride = 1;
			_odist = 0;
			res = CudaFFTNativeMethods.cufftMakePlanMany64(_handle, _rank, _n, _inembed, _istride, _idist, _onembed, _ostride, _odist, _type, _batch, ref size);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cufftMakePlanMany64", res));
			if (res != cufftResult.Success)
				throw new CudaFFTException(res);
		}
예제 #11
0
		/// <summary>
        /// Creates a FFT plan configuration of dimension rank, with sizes
        /// specified in the array <c>n</c>. The <c>batch</c> input parameter tells CUFFT how
        /// many transforms to configure in parallel. With this function, batched
		/// plans of any dimension may be created. (old API)
        /// </summary>
        /// <param name="rank">Dimensionality of the transform (1, 2, or 3)</param>
        /// <param name="n">An array of size rank, describing the size of each dimension</param>
        /// <param name="batch">Batch size for this transform</param>
        /// <param name="type">Transform data type (e.g., C2C, as per other CUFFT calls)</param>
        public CudaFFTPlanMany(int rank, int[] n, int batch, cufftType type)
        {
            _handle = new cufftHandle();
            _rank = rank;
            _n = n;
            _batch = batch;
            _type = type;
            
            //optional:
            _inembed = null;
            _istride = 1;
            _idist = 0;
            _onembed = null;
            _ostride = 1;
            _odist = 0;

            res = CudaFFTNativeMethods.cufftPlanMany(ref _handle, rank, n, _inembed, _istride, _idist, _onembed, _ostride, _odist, type, batch);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "CudaFFTPlanMany", res));
            if (res != cufftResult.Success)
                throw new CudaFFTException(res);
        }
예제 #12
0
		/// <summary>
		/// Creates a new 2D FFT plan (new API)
		/// </summary>
		/// <param name="handle">cufftHandle object</param>
		/// <param name="nx">The transform size in the X dimension (number of rows)</param>
		/// <param name="ny">The transform size in the Y dimension (number of columns)</param>
		/// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
		/// <param name="size"></param>
		/// <param name="autoAllocate">indicates that the caller intends to allocate and manage
		/// work areas for plans that have been generated.</param>
		public CudaFFTPlan2D(cufftHandle handle, int nx, int ny, cufftType type, ref SizeT size, bool autoAllocate)
			: this(handle, nx, ny, type, ref size)
		{
			SetAutoAllocation(autoAllocate);
		}
예제 #13
0
		/// <summary>
		/// Creates a new 2D FFT plan (new API)
		/// </summary>
		/// <param name="handle">cufftHandle object</param>
		/// <param name="nx">The transform size in the X dimension (number of rows)</param>
		/// <param name="ny">The transform size in the Y dimension (number of columns)</param>
		/// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
		/// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
		/// <param name="autoAllocate">indicates that the caller intends to allocate and manage
		/// work areas for plans that have been generated.</param>
		public CudaFFTPlan2D(cufftHandle handle, int nx, int ny, cufftType type, Compatibility mode, bool autoAllocate)
			: this(handle, nx, ny, type)
		{
			SetCompatibilityMode(mode);
			SetAutoAllocation(autoAllocate);
		}
예제 #14
0
		public static extern cufftResult cufftGetSizeMany64(cufftHandle plan,
									   long rank, [In] long[] n, [In] long[] inembed, [In] long istride, [In] long idist,
									   [In] long[] onembed, [In] long ostride, [In] long odist,
									   cufftType type, long batch, ref SizeT workArea);
예제 #15
0
		/// <summary>
		/// Creates a new 2D FFT plan (new API)
		/// </summary>
		/// <param name="handle">cufftHandle object</param>
		/// <param name="nx">The transform size in the X dimension (number of rows)</param>
		/// <param name="ny">The transform size in the Y dimension (number of columns)</param>
		/// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
		/// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
		/// <param name="size"></param>
		public CudaFFTPlan2D(cufftHandle handle, int nx, int ny, cufftType type, CUstream stream, ref SizeT size)
			: this(handle, nx, ny, type, ref size)
		{
			SetStream(stream);
		}
예제 #16
0
 /// <summary>
 /// Creates a new 1D FFT plan (new API)
 /// </summary>
 /// <param name="handle">cufftHandle object</param>
 /// <param name="nx">The transform size (e.g., 256 for a 256-point FFT)</param>
 /// <param name="type">The transform data type (e.g., C2C for complex to complex)</param>
 /// <param name="batch">Number of transforms of size nx</param>
 /// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
 /// <param name="autoAllocate">indicates that the caller intends to allocate and manage
 /// work areas for plans that have been generated.</param>
 public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, Compatibility mode, bool autoAllocate)
     : this(handle, nx, type, batch)
 {
     SetCompatibilityMode(mode);
     SetAutoAllocation(autoAllocate);
 }
예제 #17
0
		public static extern cufftResult cufftGetSize3d(cufftHandle handle,
                                    int nx, int ny, int nz, 
                                    cufftType type,
									ref SizeT workSize);
예제 #18
0
        ///// <summary>
        ///// Creates a new 3D FFT plan (new API)
        ///// </summary>
        ///// <param name="handle">cufftHandle object</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="nz">The transform size in the Z dimension</param>
        ///// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
        ///// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
        //public CudaFFTPlan3D(cufftHandle handle, int nx, int ny, int nz, cufftType type, Compatibility mode)
        //	: this(handle, nx, ny, nz, type)
        //{
        //	SetCompatibilityMode(mode);
        //}

        ///// <summary>
        ///// Creates a new 3D FFT plan (new API)
        ///// </summary>
        ///// <param name="handle">cufftHandle object</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="nz">The transform size in the Z dimension</param>
        ///// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
        ///// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
        ///// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
        //public CudaFFTPlan3D(cufftHandle handle, int nx, int ny, int nz, cufftType type, CUstream stream, Compatibility mode)
        //	: this(handle, nx, ny, nz, type)
        //{
        //	SetStream(stream);
        //	SetCompatibilityMode(mode);
        //}


        /// <summary>
        /// Creates a new 3D FFT plan (new API)
        /// </summary>
        /// <param name="handle">cufftHandle object</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="nz">The transform size in the Z dimension</param>
        /// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
        /// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
        /// <param name="size"></param>
        public CudaFFTPlan3D(cufftHandle handle, int nx, int ny, int nz, cufftType type, CUstream stream, ref SizeT size)
            : this(handle, nx, ny, nz, type, ref size)
        {
            SetStream(stream);
        }
예제 #19
0
 public static extern cufftResult cufftPlanMany([In, Out] ref cufftHandle plan, [In] int rank, [In] int[] n, [In] int[] inembed, [In] int istride, [In] int idist,
                                                [In] int[] onembed, [In] int ostride, [In] int odist, [In] cufftType type, [In] int batch);
예제 #20
0
 /// <summary>
 /// Creates a new 1D FFT plan (old API)
 /// </summary>
 /// <param name="nx">The transform size (e.g., 256 for a 256-point FFT)</param>
 /// <param name="type">The transform data type (e.g., C2C for complex to complex)</param>
 /// <param name="batch">Number of transforms of size nx</param>
 /// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
 /// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
 public CudaFFTPlan1D(int nx, cufftType type, int batch, CUstream stream, Compatibility mode)
     : this(nx, type, batch)
 {
     SetStream(stream);
     SetCompatibilityMode(mode);
 }
예제 #21
0
        /// <summary>
		/// Creates a new 1D FFT plan (old API)
        /// </summary>
        /// <param name="nx">The transform size (e.g., 256 for a 256-point FFT)</param>
        /// <param name="type">The transform data type (e.g., C2C for complex to complex)</param>
        /// <param name="batch">Number of transforms of size nx</param>
        /// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
        /// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
        public CudaFFTPlan1D(int nx, cufftType type, int batch, CUstream stream, Compatibility mode)
            : this(nx, type, batch)
        {
            SetStream(stream);
            SetCompatibilityMode(mode);
		}
예제 #22
0
 /// <summary>
 /// Creates a new 1D FFT plan (old API)
 /// </summary>
 /// <param name="nx">The transform size (e.g., 256 for a 256-point FFT)</param>
 /// <param name="type">The transform data type (e.g., C2C for complex to complex)</param>
 /// <param name="batch">Number of transforms of size nx</param>
 /// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
 public CudaFFTPlan1D(int nx, cufftType type, int batch, CUstream stream)
     : this(nx, type, batch)
 {
     SetStream(stream);
 }
예제 #23
0
 /// <summary>
 /// Creates a new 1D FFT plan (new API)
 /// </summary>
 /// <param name="handle">cufftHandle object</param>
 /// <param name="nx">The transform size (e.g., 256 for a 256-point FFT)</param>
 /// <param name="type">The transform data type (e.g., C2C for complex to complex)</param>
 /// <param name="batch">Number of transforms of size nx</param>
 /// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
 /// <param name="size"></param>
 public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, Compatibility mode, ref SizeT size)
     : this(handle, nx, type, batch, ref size)
 {
     SetCompatibilityMode(mode);
 }
예제 #24
0
 /// <summary>
 /// Creates a new 1D FFT plan (new API)
 /// </summary>
 /// <param name="handle">cufftHandle object</param>
 /// <param name="nx">The transform size (e.g., 256 for a 256-point FFT)</param>
 /// <param name="type">The transform data type (e.g., C2C for complex to complex)</param>
 /// <param name="batch">Number of transforms of size nx</param>
 /// <param name="size"></param>
 /// <param name="autoAllocate">indicates that the caller intends to allocate and manage
 /// work areas for plans that have been generated.</param>
 public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, ref SizeT size, bool autoAllocate)
     : this(handle, nx, type, batch, ref size)
 {
     SetAutoAllocation(autoAllocate);
 }
예제 #25
0
		/// <summary>
		/// During plan execution, CUFFT requires a work area for temporary storage of
		/// intermediate results. This call returns an estimate for the size of the work area required,
		/// given the specified parameters, and assuming default plan settings. Note that changing
		/// some plan settings, such as compatibility mode, may alter the size required for the work
		/// area.
		/// </summary>
		/// <param name="nx">The transform size in the x dimension (number of rows)</param>
		/// <param name="ny">The transform size in the y dimension (number of columns)</param>
		/// <param name="type">The transform data type (e.g., CUFFT_C2C for single
		/// precision complex to complex)</param>
		/// <returns></returns>
		public static SizeT EstimateSize(int nx, int ny, cufftType type)
		{
			SizeT size = new SizeT();
			cufftResult res = CudaFFTNativeMethods.cufftEstimate2d(nx, ny, type, ref size);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cufftEstimate2d", res));
			if (res != cufftResult.Success)
				throw new CudaFFTException(res);
			return size;
		}
예제 #26
0
        ///// <summary>
        ///// Creates a new 3D FFT plan (new API)
        ///// </summary>
        ///// <param name="handle">cufftHandle object</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="nz">The transform size in the Z dimension</param>
        ///// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
        ///// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
        ///// <param name="size"></param>
        //public CudaFFTPlan3D(cufftHandle handle, int nx, int ny, int nz, cufftType type, Compatibility mode, ref SizeT size)
        //	: this(handle, nx, ny, nz, type, ref size)
        //{
        //	SetCompatibilityMode(mode);
        //}

        ///// <summary>
        ///// Creates a new 3D FFT plan (new API)
        ///// </summary>
        ///// <param name="handle">cufftHandle object</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="nz">The transform size in the Z dimension</param>
        ///// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
        ///// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
        ///// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
        ///// <param name="size"></param>
        //public CudaFFTPlan3D(cufftHandle handle, int nx, int ny, int nz, cufftType type, CUstream stream, Compatibility mode, ref SizeT size)
        //	: this(handle, nx, ny, nz, type, ref size)
        //{
        //	SetStream(stream);
        //	SetCompatibilityMode(mode);
        //}

        /// <summary>
        /// Creates a new 3D FFT plan (new API)
        /// </summary>
        /// <param name="handle">cufftHandle object</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="nz">The transform size in the Z dimension</param>
        /// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
        /// <param name="autoAllocate">indicates that the caller intends to allocate and manage
        /// work areas for plans that have been generated.</param>
        public CudaFFTPlan3D(cufftHandle handle, int nx, int ny, int nz, cufftType type, bool autoAllocate)
            : this(handle, nx, ny, nz, type)
        {
            SetAutoAllocation(autoAllocate);
        }
예제 #27
0
        /// <summary>
		/// Creates a new 2D FFT plan (old API)
        /// </summary>
        /// <param name="nx">The transform size in the X dimension (number of rows)</param>
        /// <param name="ny">The transform size in the Y dimension (number of columns)</param>
        /// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
        /// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
        public CudaFFTPlan2D(int nx, int ny, cufftType type, CUstream stream)
            : this(nx, ny, type)
        {
            SetStream(stream);
        }
예제 #28
0
        ///// <summary>
        ///// Creates a new 3D FFT plan (new API)
        ///// </summary>
        ///// <param name="handle">cufftHandle object</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="nz">The transform size in the Z dimension</param>
        ///// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
        ///// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
        ///// <param name="autoAllocate">indicates that the caller intends to allocate and manage
        ///// work areas for plans that have been generated.</param>
        //public CudaFFTPlan3D(cufftHandle handle, int nx, int ny, int nz, cufftType type, Compatibility mode, bool autoAllocate)
        //	: this(handle, nx, ny, nz, type)
        //{
        //	SetCompatibilityMode(mode);
        //	SetAutoAllocation(autoAllocate);
        //}

        ///// <summary>
        ///// Creates a new 3D FFT plan (new API)
        ///// </summary>
        ///// <param name="handle">cufftHandle object</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="nz">The transform size in the Z dimension</param>
        ///// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
        ///// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
        ///// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
        ///// <param name="autoAllocate">indicates that the caller intends to allocate and manage
        ///// work areas for plans that have been generated.</param>
        //public CudaFFTPlan3D(cufftHandle handle, int nx, int ny, int nz, cufftType type, CUstream stream, Compatibility mode, bool autoAllocate)
        //	: this(handle, nx, ny, nz, type)
        //{
        //	SetStream(stream);
        //	SetCompatibilityMode(mode);
        //	SetAutoAllocation(autoAllocate);
        //}


        /// <summary>
        /// Creates a new 3D FFT plan (new API)
        /// </summary>
        /// <param name="handle">cufftHandle object</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="nz">The transform size in the Z dimension</param>
        /// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
        /// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
        /// <param name="size"></param>
        /// <param name="autoAllocate">indicates that the caller intends to allocate and manage
        /// work areas for plans that have been generated.</param>
        public CudaFFTPlan3D(cufftHandle handle, int nx, int ny, int nz, cufftType type, CUstream stream, ref SizeT size, bool autoAllocate)
            : this(handle, nx, ny, nz, type, ref size)
        {
            SetStream(stream);
            SetAutoAllocation(autoAllocate);
        }
예제 #29
0
 public static extern cufftResult cufftMakePlan3d(cufftHandle plan,
                                                  int nx, int ny, int nz,
                                                  cufftType type,
                                                  ref SizeT workSize);
예제 #30
0
        /// <summary>
		/// Creates a new 1D FFT plan (old API)
        /// </summary>
        /// <param name="nx">The transform size (e.g., 256 for a 256-point FFT)</param>
        /// <param name="type">The transform data type (e.g., C2C for complex to complex)</param>
        /// <param name="batch">Number of transforms of size nx</param>
        /// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
        public CudaFFTPlan1D(int nx, cufftType type, int batch, CUstream stream)
            : this(nx, type, batch)
        {
            SetStream(stream);
        }
예제 #31
0
		public static extern cufftResult cufftGetSize1d(cufftHandle handle, 
                                    int nx, 
                                    cufftType type, 
                                    int batch,
									ref SizeT workSize);
예제 #32
0
		/// <summary>
		/// Creates a new 1D FFT plan (new API)
		/// </summary>
		/// <param name="handle">cufftHandle object</param>
		/// <param name="nx">The transform size (e.g., 256 for a 256-point FFT)</param>
		/// <param name="type">The transform data type (e.g., C2C for complex to complex)</param>
		/// <param name="batch">Number of transforms of size nx</param>
		/// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
		/// <param name="size"></param>
		/// <param name="autoAllocate">indicates that the caller intends to allocate and manage
		/// work areas for plans that have been generated.</param>
		public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, Compatibility mode, ref SizeT size, bool autoAllocate)
			: this(handle, nx, type, batch, ref size)
		{
			SetCompatibilityMode(mode);
			SetAutoAllocation(autoAllocate);
		}
예제 #33
0
		public static extern cufftResult cufftGetSizeMany(cufftHandle handle,
									  int rank, [In] int[] n, [In] int[] inembed, [In] int istride, [In] int idist,
								      [In] int[] onembed, [In] int ostride, [In] int odist,
									  cufftType type, int batch, ref SizeT workArea);
예제 #34
0
 /// <summary>
 /// Creates a new 3D FFT plan (old API)
 /// </summary>
 /// <param name="nx">The transform size in the X dimension</param>
 /// <param name="ny">The transform size in the Y dimension</param>
 /// <param name="nz">The transform size in the Z dimension</param>
 /// <param name="type">The transform data type (e.g., R2C for real to complex)</param>
 /// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
 public CudaFFTPlan3D(int nx, int ny, int nz, cufftType type, CUstream stream)
     : this(nx, ny, nz, type)
 {
     SetStream(stream);
 }
예제 #35
0
		/// <summary>
		/// Creates a new 2D FFT plan (new API)
		/// </summary>
		/// <param name="handle">cufftHandle object</param>
		/// <param name="nx">The transform size in the X dimension (number of rows)</param>
		/// <param name="ny">The transform size in the Y dimension (number of columns)</param>
		/// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
		public CudaFFTPlan2D(cufftHandle handle, int nx, int ny, cufftType type)
		{
			SizeT size = new SizeT();
			_handle = handle;
			_nx = nx;
			_type = type;
			res = CudaFFTNativeMethods.cufftMakePlan2d(_handle, nx, ny, type, ref size);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cufftMakePlan2d", res));
			if (res != cufftResult.Success)
				throw new CudaFFTException(res);
		}
예제 #36
0
		public static extern cufftResult cufftMakePlan1d(cufftHandle plan, 
                                     int nx, 
                                     cufftType type, 
                                     int batch, /* deprecated - use cufftPlanMany */
                                     ref SizeT workSize);
예제 #37
0
		/// <summary>
		/// Creates a new 2D FFT plan (new API)
		/// </summary>
		/// <param name="handle">cufftHandle object</param>
		/// <param name="nx">The transform size in the X dimension (number of rows)</param>
		/// <param name="ny">The transform size in the Y dimension (number of columns)</param>
		/// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
		/// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
		/// <param name="size"></param>
		public CudaFFTPlan2D(cufftHandle handle, int nx, int ny, cufftType type, Compatibility mode, ref SizeT size)
			: this(handle, nx, ny, type, ref size)
		{
			SetCompatibilityMode(mode);
		}
예제 #38
0
		/// <summary>
		/// Creates a new 1D FFT plan (new API)
		/// </summary>
		/// <param name="handle">cufftHandle object</param>
		/// <param name="nx">The transform size (e.g., 256 for a 256-point FFT)</param>
		/// <param name="type">The transform data type (e.g., C2C for complex to complex)</param>
		/// <param name="batch">Number of transforms of size nx</param>
		/// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
		/// <param name="size"></param>
		/// <param name="autoAllocate">indicates that the caller intends to allocate and manage
		/// work areas for plans that have been generated.</param>
		public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, CUstream stream, ref SizeT size, bool autoAllocate)
			: this(handle, nx, type, batch, ref size)
		{
			SetStream(stream);
			SetAutoAllocation(autoAllocate);
		}
예제 #39
0
		/// <summary>
		/// Creates a new 2D FFT plan (new API)
		/// </summary>
		/// <param name="handle">cufftHandle object</param>
		/// <param name="nx">The transform size in the X dimension (number of rows)</param>
		/// <param name="ny">The transform size in the Y dimension (number of columns)</param>
		/// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
		/// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
		/// <param name="autoAllocate">indicates that the caller intends to allocate and manage
		/// work areas for plans that have been generated.</param>
		public CudaFFTPlan2D(cufftHandle handle, int nx, int ny, cufftType type, CUstream stream, bool autoAllocate)
			: this(handle, nx, ny, type)
		{
			SetStream(stream);
			SetAutoAllocation(autoAllocate);
		}
예제 #40
0
 public static extern cufftResult cufftEstimate3d(int nx, int ny, int nz,
                                                  cufftType type,
                                                  ref SizeT workSize);
예제 #41
0
		/// <summary>
		/// Creates a new 2D FFT plan (new API)
		/// </summary>
		/// <param name="handle">cufftHandle object</param>
		/// <param name="nx">The transform size in the X dimension (number of rows)</param>
		/// <param name="ny">The transform size in the Y dimension (number of columns)</param>
		/// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
		/// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
		/// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
		/// <param name="size"></param>
		/// <param name="autoAllocate">indicates that the caller intends to allocate and manage
		/// work areas for plans that have been generated.</param>
		public CudaFFTPlan2D(cufftHandle handle, int nx, int ny, cufftType type, CUstream stream, Compatibility mode, ref SizeT size, bool autoAllocate)
			: this(handle, nx, ny, type, ref size)
		{
			SetStream(stream);
			SetCompatibilityMode(mode);
			SetAutoAllocation(autoAllocate);
		}
예제 #42
0
 public static extern cufftResult cufftGetSize1d(cufftHandle handle,
                                                 int nx,
                                                 cufftType type,
                                                 int batch,
                                                 ref SizeT workSize);
예제 #43
0
		/// <summary>
		/// Creates a new 1D FFT plan (new API)
		/// </summary>
		/// <param name="handle">cufftHandle object</param>
		/// <param name="nx">The transform size (e.g., 256 for a 256-point FFT)</param>
		/// <param name="type">The transform data type (e.g., C2C for complex to complex)</param>
		/// <param name="batch">Number of transforms of size nx</param>
		/// <param name="autoAllocate">indicates that the caller intends to allocate and manage
		/// work areas for plans that have been generated.</param>
		public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, bool autoAllocate)
			: this(handle, nx, type, batch)
		{
			SetAutoAllocation(autoAllocate);
		}
예제 #44
0
 public static extern cufftResult cufftGetSizeMany(cufftHandle handle,
                                                   int rank, [In] int[] n, [In] int[] inembed, [In] int istride, [In] int idist,
                                                   [In] int[] onembed, [In] int ostride, [In] int odist,
                                                   cufftType type, int batch, ref SizeT workArea);
예제 #45
0
        /// <summary>
		/// Creates a new 2D FFT plan (old API)
        /// </summary>
        /// <param name="nx">The transform size in the X dimension (number of rows)</param>
        /// <param name="ny">The transform size in the Y dimension (number of columns)</param>
        /// <param name="type">The transform data type (e.g., C2R for complex to real)</param>
        /// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
        /// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
        public CudaFFTPlan2D(int nx, int ny, cufftType type, CUstream stream, Compatibility mode)
            : this(nx, ny, type)
        {
            SetStream(stream);
            SetCompatibilityMode(mode);
        }
예제 #46
0
 public static extern cufftResult cufftPlan1d([In, Out] ref cufftHandle plan, [In] int nx, [In] cufftType type, [In] int batch);
예제 #47
0
 public static extern cufftResult cufftMakePlan1d(cufftHandle plan,
                                                  int nx,
                                                  cufftType type,
                                                  int batch, /* deprecated - use cufftPlanMany */
                                                  ref SizeT workSize);
예제 #48
0
		/// <summary>
		/// Creates a new 1D FFT plan (new API)
		/// </summary>
		/// <param name="handle">cufftHandle object</param>
		/// <param name="nx">The transform size (e.g., 256 for a 256-point FFT)</param>
		/// <param name="type">The transform data type (e.g., C2C for complex to complex)</param>
		/// <param name="batch">Number of transforms of size nx</param>
		/// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
		/// <param name="mode">The <see cref="Compatibility"/> option to be used</param>
		/// <param name="autoAllocate">indicates that the caller intends to allocate and manage
		/// work areas for plans that have been generated.</param>
		public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, CUstream stream, Compatibility mode, bool autoAllocate)
			: this(handle, nx, type, batch)
		{
			SetStream(stream);
			SetCompatibilityMode(mode);
			SetAutoAllocation(autoAllocate);
		}
예제 #49
0
		public static extern cufftResult cufftMakePlan3d(cufftHandle plan, 
                                     int nx, int ny, int nz, 
                                     cufftType type,
									 ref SizeT workSize);
예제 #50
0
 /// <summary>
 /// Creates a new 1D FFT plan (new API)
 /// </summary>
 /// <param name="handle">cufftHandle object</param>
 /// <param name="nx">The transform size (e.g., 256 for a 256-point FFT)</param>
 /// <param name="type">The transform data type (e.g., C2C for complex to complex)</param>
 /// <param name="batch">Number of transforms of size nx</param>
 /// <param name="stream">A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream)</param>
 /// <param name="autoAllocate">indicates that the caller intends to allocate and manage
 /// work areas for plans that have been generated.</param>
 public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, CUstream stream, bool autoAllocate)
     : this(handle, nx, type, batch)
 {
     SetStream(stream);
     SetAutoAllocation(autoAllocate);
 }
예제 #51
0
 public static extern cufftResult cufftEstimate1d(int nx,
                                                  cufftType type,
                                                  int batch, /* deprecated - use cufftPlanMany */
                                                  ref SizeT workSize);
예제 #52
0
		public static extern cufftResult cufftMakePlanMany(cufftHandle plan,
                                       int rank,
                                       [In] int[] n, [In] int[] inembed, [In] int istride, [In] int idist,
									   [In] int[] onembed, [In] int ostride, [In] int odist,
                                       cufftType type,
                                       int batch,
									   ref SizeT workSize);
예제 #53
0
 public static extern cufftResult cufftEstimateMany(int rank,
                                                    [In] int[] n, [In] int[] inembed, [In] int istride, [In] int idist,
                                                    [In] int[] onembed, [In] int ostride, [In] int odist,
                                                    cufftType type,
                                                    int batch,
                                                    ref SizeT workSize);
예제 #54
0
		public static extern cufftResult cufftMakePlanMany64(cufftHandle plan, 
                                         int rank, 
                                         [In] long[] n, [In] long[] inembed, [In] long istride, [In] long idist,
										 [In] long[] onembed, [In] long ostride, [In] long odist,
										 cufftType type,
										 long batch,
										 ref SizeT workSize);
예제 #55
0
 public static extern cufftResult cufftGetSize3d(cufftHandle handle,
                                                 int nx, int ny, int nz,
                                                 cufftType type,
                                                 ref SizeT workSize);
예제 #56
0
		public static extern cufftResult cufftEstimate1d(int nx, 
                                     cufftType type, 
                                     int batch, /* deprecated - use cufftPlanMany */
									 ref SizeT workSize);
예제 #57
0
 public static extern cufftResult cufftGetSizeMany64(cufftHandle plan,
                                                     long rank, [In] long[] n, [In] long[] inembed, [In] long istride, [In] long idist,
                                                     [In] long[] onembed, [In] long ostride, [In] long odist,
                                                     cufftType type, long batch, ref SizeT workArea);
예제 #58
0
		public static extern cufftResult cufftEstimate3d(int nx, int ny, int nz, 
                                     cufftType type,
									 ref SizeT workSize);
예제 #59
0
 public static extern cufftResult cufftPlan3d([In, Out] ref cufftHandle plan, [In] int nx, [In] int ny, [In] int nz, [In] cufftType type);
예제 #60
0
		public static extern cufftResult cufftEstimateMany(int rank,
									   [In] int[] n, [In] int[] inembed, [In] int istride, [In] int idist,
									   [In] int[] onembed, [In] int ostride, [In] int odist,
                                       cufftType type,
                                       int batch,
									   ref SizeT workSize);