示例#1
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);
示例#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 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);
示例#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>
 /// 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);
     }
 }
示例#8
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);
     }
 }
示例#9
0
        /// <summary>
        /// Creates only an opaque handle, and allocates small data structures on the host. The
        /// cufftMakePlan*() calls actually do the plan generation. It is recommended that
        /// cufftSet*() calls, such as cufftSetCompatibilityMode(), that may require a plan
        /// to be broken down and re-generated, should be made after cufftCreate() and before
        /// one of the cufftMakePlan*() calls.
        /// </summary>
        /// <returns></returns>
        public static cufftHandle Create()
        {
            cufftHandle handle = new cufftHandle();

            cufftResult res = CudaFFTNativeMethods.cufftCreate(ref handle);

            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cufftCreate", res));
            if (res != cufftResult.Success)
            {
                throw new CudaFFTException(res);
            }

            return(handle);
        }
示例#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="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);
		}
示例#13
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>
		public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, CUstream stream, Compatibility mode, ref SizeT size)
			: this(handle, nx, type, batch, ref size)
		{
			SetStream(stream);
			SetCompatibilityMode(mode);
		}
示例#14
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);
		}
示例#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="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);
		}
示例#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="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);
		}
示例#17
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>
		public CudaFFTPlan2D(cufftHandle handle, int nx, int ny, cufftType type, CUstream stream, Compatibility mode)
			: this(handle, nx, ny, type)
		{
			SetStream(stream);
			SetCompatibilityMode(mode);
		}
示例#18
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);
		}
示例#19
0
 public static extern cufftResult cufftSetCompatibilityMode([In] cufftHandle plan, [In] Compatibility mode);
示例#20
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);
        }
示例#21
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);
        }
示例#22
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);
        }
示例#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>
		/// <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);
		}
示例#24
0
        /// <summary>
        /// Creates only an opaque handle, and allocates small data structures on the host. The
        /// cufftMakePlan*() calls actually do the plan generation. It is recommended that
        /// cufftSet*() calls, such as cufftSetCompatibilityMode(), that may require a plan
        /// to be broken down and re-generated, should be made after cufftCreate() and before
        /// one of the cufftMakePlan*() calls.
        /// </summary>
        /// <returns></returns>
        public static cufftHandle Create()
        {
            cufftHandle handle = new cufftHandle();

            cufftResult res = CudaFFTNativeMethods.cufftCreate(ref handle);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cufftCreate", res));
            if (res != cufftResult.Success)
                throw new CudaFFTException(res);

            return handle;
        }
示例#25
0
 public static extern cufftResult cufftMakePlan1d(cufftHandle plan,
                                                  int nx,
                                                  cufftType type,
                                                  int batch, /* deprecated - use cufftPlanMany */
                                                  ref SizeT workSize);
		public static extern cufftResult cufftMakePlan1d(cufftHandle plan, 
                                     int nx, 
                                     cufftType type, 
                                     int batch, /* deprecated - use cufftPlanMany */
                                     ref SizeT workSize);
示例#27
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>
		public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, CUstream stream, ref SizeT size)
			: this(handle, nx, type, batch, ref size)
		{
			SetStream(stream);
		}
		public static extern cufftResult cufftMakePlan3d(cufftHandle plan, 
                                     int nx, int ny, int nz, 
                                     cufftType type,
									 ref SizeT workSize);
示例#29
0
 public static extern cufftResult cufftSetStream([In] cufftHandle plan, [In] CUstream stream);
		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);
示例#31
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);
		}
		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);
示例#33
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);
		}
示例#34
0
 public static extern cufftResult cufftCreate(ref cufftHandle cufftHandle);
示例#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>
		/// <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);
		}
示例#36
0
 public static extern cufftResult cufftGetSize3d(cufftHandle handle,
                                                 int nx, int ny, int nz,
                                                 cufftType type,
                                                 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="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);
		}
示例#38
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);
示例#39
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);
		}
示例#40
0
 public static extern cufftResult cufftPlan1d([In, Out] ref cufftHandle plan, [In] int nx, [In] cufftType type, [In] int batch);
示例#41
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);
示例#42
0
 public static extern cufftResult cufftSetAutoAllocation(cufftHandle plan, int autoAllocate);
示例#43
0
 public static extern cufftResult cufftMakePlan3d(cufftHandle plan,
                                                  int nx, int ny, int nz,
                                                  cufftType type,
                                                  ref SizeT workSize);
示例#44
0
 public static extern cufftResult cufftExecZ2Z([In] cufftHandle plan, [In] CUdeviceptr idata, [Out] CUdeviceptr odata, [In] TransformDirection direction);
		public static extern cufftResult cufftCreate(ref cufftHandle cufftHandle);
示例#46
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);
 }
示例#47
0
 public static extern cufftResult cufftGetSize1d(cufftHandle handle,
                                                 int nx,
                                                 cufftType type,
                                                 int batch,
                                                 ref SizeT workSize);
		public static extern cufftResult cufftGetSize1d(cufftHandle handle, 
                                    int nx, 
                                    cufftType type, 
                                    int batch,
									ref SizeT workSize);
示例#49
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);
		public static extern cufftResult cufftGetSize3d(cufftHandle handle,
                                    int nx, int ny, int nz, 
                                    cufftType type,
									ref SizeT workSize);
示例#51
0
 public static extern cufftResult cufftGetSize(cufftHandle handle, ref SizeT workSize);
		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);
示例#53
0
 public static extern cufftResult cufftSetWorkArea(cufftHandle plan, CUdeviceptr workArea);
		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);
示例#55
0
 public static extern cufftResult cufftDestroy([In] cufftHandle plan);
		public static extern cufftResult cufftGetSize(cufftHandle handle, ref SizeT workSize);
示例#57
0
 public static extern cufftResult cufftExecZ2D([In] cufftHandle plan, [In] CUdeviceptr idata, [In] CUdeviceptr odata);
		public static extern cufftResult cufftSetWorkArea(cufftHandle plan, CUdeviceptr workArea);
示例#59
0
 public static extern cufftResult cufftPlan3d([In, Out] ref cufftHandle plan, [In] int nx, [In] int ny, [In] int nz, [In] cufftType type);
		public static extern cufftResult cufftSetAutoAllocation(cufftHandle plan, int autoAllocate);