Class CudaFFTPlan1D
Creates a 1D FFT plan configuration for a specified signal size and data
type. The batch
input parameter tells CUFFT how many 1D
transforms to configure.
Inheritance
Implements
Inherited Members
Namespace: ManagedCuda.CudaFFT
Assembly: CudaFFT.dll
Syntax
public class CudaFFTPlan1D : IDisposable
Constructors
| Improve this Doc View SourceCudaFFTPlan1D(cufftHandle, Int32, cufftType, Int32)
Creates a new 1D FFT plan (new API)
Declaration
public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch)
Parameters
Type | Name | Description |
---|---|---|
cufftHandle | handle | cufftHandle object |
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
CudaFFTPlan1D(cufftHandle, Int32, cufftType, Int32, CUstream)
Creates a new 1D FFT plan (new API)
Declaration
public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
cufftHandle | handle | cufftHandle object |
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
CUstream | stream | A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream) |
CudaFFTPlan1D(cufftHandle, Int32, cufftType, Int32, CUstream, ref SizeT)
Creates a new 1D FFT plan (new API)
Declaration
public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, CUstream stream, ref SizeT size)
Parameters
Type | Name | Description |
---|---|---|
cufftHandle | handle | cufftHandle object |
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
CUstream | stream | A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream) |
SizeT | size |
CudaFFTPlan1D(cufftHandle, Int32, cufftType, Int32, CUstream, ref SizeT, Boolean)
Creates a new 1D FFT plan (new API)
Declaration
public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, CUstream stream, ref SizeT size, bool autoAllocate)
Parameters
Type | Name | Description |
---|---|---|
cufftHandle | handle | cufftHandle object |
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
CUstream | stream | A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream) |
SizeT | size | |
System.Boolean | autoAllocate | indicates that the caller intends to allocate and manage work areas for plans that have been generated. |
CudaFFTPlan1D(cufftHandle, Int32, cufftType, Int32, CUstream, Compatibility)
Creates a new 1D FFT plan (new API)
Declaration
public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, CUstream stream, Compatibility mode)
Parameters
Type | Name | Description |
---|---|---|
cufftHandle | handle | cufftHandle object |
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
CUstream | stream | A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream) |
Compatibility | mode | The Compatibility option to be used |
CudaFFTPlan1D(cufftHandle, Int32, cufftType, Int32, CUstream, Compatibility, ref SizeT)
Creates a new 1D FFT plan (new API)
Declaration
public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, CUstream stream, Compatibility mode, ref SizeT size)
Parameters
Type | Name | Description |
---|---|---|
cufftHandle | handle | cufftHandle object |
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
CUstream | stream | A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream) |
Compatibility | mode | The Compatibility option to be used |
SizeT | size |
CudaFFTPlan1D(cufftHandle, Int32, cufftType, Int32, CUstream, Compatibility, ref SizeT, Boolean)
Creates a new 1D FFT plan (new API)
Declaration
public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, CUstream stream, Compatibility mode, ref SizeT size, bool autoAllocate)
Parameters
Type | Name | Description |
---|---|---|
cufftHandle | handle | cufftHandle object |
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
CUstream | stream | A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream) |
Compatibility | mode | The Compatibility option to be used |
SizeT | size | |
System.Boolean | autoAllocate | indicates that the caller intends to allocate and manage work areas for plans that have been generated. |
CudaFFTPlan1D(cufftHandle, Int32, cufftType, Int32, CUstream, Compatibility, Boolean)
Creates a new 1D FFT plan (new API)
Declaration
public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, CUstream stream, Compatibility mode, bool autoAllocate)
Parameters
Type | Name | Description |
---|---|---|
cufftHandle | handle | cufftHandle object |
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
CUstream | stream | A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream) |
Compatibility | mode | The Compatibility option to be used |
System.Boolean | autoAllocate | indicates that the caller intends to allocate and manage work areas for plans that have been generated. |
CudaFFTPlan1D(cufftHandle, Int32, cufftType, Int32, CUstream, Boolean)
Creates a new 1D FFT plan (new API)
Declaration
public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, CUstream stream, bool autoAllocate)
Parameters
Type | Name | Description |
---|---|---|
cufftHandle | handle | cufftHandle object |
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
CUstream | stream | A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream) |
System.Boolean | autoAllocate | indicates that the caller intends to allocate and manage work areas for plans that have been generated. |
CudaFFTPlan1D(cufftHandle, Int32, cufftType, Int32, ref SizeT)
Creates a new 1D FFT plan (new API)
Declaration
public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, ref SizeT size)
Parameters
Type | Name | Description |
---|---|---|
cufftHandle | handle | cufftHandle object |
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
SizeT | size |
CudaFFTPlan1D(cufftHandle, Int32, cufftType, Int32, ref SizeT, Boolean)
Creates a new 1D FFT plan (new API)
Declaration
public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, ref SizeT size, bool autoAllocate)
Parameters
Type | Name | Description |
---|---|---|
cufftHandle | handle | cufftHandle object |
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
SizeT | size | |
System.Boolean | autoAllocate | indicates that the caller intends to allocate and manage work areas for plans that have been generated. |
CudaFFTPlan1D(cufftHandle, Int32, cufftType, Int32, Compatibility)
Creates a new 1D FFT plan (new API)
Declaration
public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, Compatibility mode)
Parameters
Type | Name | Description |
---|---|---|
cufftHandle | handle | cufftHandle object |
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
Compatibility | mode | The Compatibility option to be used |
CudaFFTPlan1D(cufftHandle, Int32, cufftType, Int32, Compatibility, ref SizeT)
Creates a new 1D FFT plan (new API)
Declaration
public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, Compatibility mode, ref SizeT size)
Parameters
Type | Name | Description |
---|---|---|
cufftHandle | handle | cufftHandle object |
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
Compatibility | mode | The Compatibility option to be used |
SizeT | size |
CudaFFTPlan1D(cufftHandle, Int32, cufftType, Int32, Compatibility, ref SizeT, Boolean)
Creates a new 1D FFT plan (new API)
Declaration
public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, Compatibility mode, ref SizeT size, bool autoAllocate)
Parameters
Type | Name | Description |
---|---|---|
cufftHandle | handle | cufftHandle object |
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
Compatibility | mode | The Compatibility option to be used |
SizeT | size | |
System.Boolean | autoAllocate | indicates that the caller intends to allocate and manage work areas for plans that have been generated. |
CudaFFTPlan1D(cufftHandle, Int32, cufftType, Int32, Compatibility, Boolean)
Creates a new 1D FFT plan (new API)
Declaration
public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, Compatibility mode, bool autoAllocate)
Parameters
Type | Name | Description |
---|---|---|
cufftHandle | handle | cufftHandle object |
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
Compatibility | mode | The Compatibility option to be used |
System.Boolean | autoAllocate | indicates that the caller intends to allocate and manage work areas for plans that have been generated. |
CudaFFTPlan1D(cufftHandle, Int32, cufftType, Int32, Boolean)
Creates a new 1D FFT plan (new API)
Declaration
public CudaFFTPlan1D(cufftHandle handle, int nx, cufftType type, int batch, bool autoAllocate)
Parameters
Type | Name | Description |
---|---|---|
cufftHandle | handle | cufftHandle object |
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
System.Boolean | autoAllocate | indicates that the caller intends to allocate and manage work areas for plans that have been generated. |
CudaFFTPlan1D(Int32, cufftType, Int32)
Creates a new 1D FFT plan (old API)
Declaration
public CudaFFTPlan1D(int nx, cufftType type, int batch)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
CudaFFTPlan1D(Int32, cufftType, Int32, CUstream)
Creates a new 1D FFT plan (old API)
Declaration
public CudaFFTPlan1D(int nx, cufftType type, int batch, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
CUstream | stream | A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream) |
CudaFFTPlan1D(Int32, cufftType, Int32, CUstream, Compatibility)
Creates a new 1D FFT plan (old API)
Declaration
public CudaFFTPlan1D(int nx, cufftType type, int batch, CUstream stream, Compatibility mode)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
CUstream | stream | A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream) |
Compatibility | mode | The Compatibility option to be used |
CudaFFTPlan1D(Int32, cufftType, Int32, Compatibility)
Creates a new 1D FFT plan (old API)
Declaration
public CudaFFTPlan1D(int nx, cufftType type, int batch, Compatibility mode)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nx | The transform size (e.g., 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., C2C for complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
Compatibility | mode | The Compatibility option to be used |
Properties
| Improve this Doc View SourceBatch
Number of transforms of size NX
Declaration
public int Batch { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Handle
Handle
Declaration
public cufftHandle Handle { get; }
Property Value
Type | Description |
---|---|
cufftHandle |
NX
The transform size (e.g., 256 for a 256-point FFT)
Declaration
public int NX { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Type
The transform data type (e.g., C2C for complex to complex)
Declaration
public cufftType Type { get; }
Property Value
Type | Description |
---|---|
cufftType |
Methods
| Improve this Doc View SourceDispose()
Dispose
Declaration
public void Dispose()
Dispose(Boolean)
For IDisposable
Declaration
protected virtual void Dispose(bool fDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | fDisposing |
EstimateSize(Int32, cufftType, Int32)
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.
Declaration
public static SizeT EstimateSize(int nx, cufftType type, int batch)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nx | The transform size (e.g. 256 for a 256-point FFT) |
cufftType | type | The transform data type (e.g., CUFFT_C2C for single precision complex to complex) |
System.Int32 | batch | Number of transforms of size nx |
Returns
Type | Description |
---|---|
SizeT |
Exec(CUdeviceptr)
Executes a CUFTT transorm as defined by the cufftType. This method does an in‐place transform.
This method is only valid for transform types where transorm direction is implicitly given by the type (i.e. not C2C and not Z2Z)
Declaration
public void Exec(CUdeviceptr iodata)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | iodata |
Exec(CUdeviceptr, CUdeviceptr)
Executes a CUFTT transorm as defined by the cufftType. If idata and odata are the same, this method does an in‐place transform.
This method is only valid for transform types where transorm direction is implicitly given by the type (i.e. not C2C and not Z2Z)
Declaration
public void Exec(CUdeviceptr idata, CUdeviceptr odata)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | idata | |
CUdeviceptr | odata |
Exec(CUdeviceptr, CUdeviceptr, TransformDirection)
Executes a CUFTT transorm as defined by the cufftType. If idata and odata are the same, this method does an in‐place transform.
Declaration
public void Exec(CUdeviceptr idata, CUdeviceptr odata, TransformDirection direction)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | idata | |
CUdeviceptr | odata | |
TransformDirection | direction | Only unsed for transformations where direction is not implicitly given by type |
Exec(CUdeviceptr, TransformDirection)
Executes a CUFTT transorm as defined by the cufftType. This method does an in‐place transform.
Declaration
public void Exec(CUdeviceptr iodata, TransformDirection direction)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | iodata | |
TransformDirection | direction | Only unsed for transformations where direction is not implicitly given by type |
Finalize()
For dispose
Declaration
protected void Finalize()
GetActualSize()
Once plan generation has been done, either with the original API or the extensible API, this call returns the actual size of the work area required to support the plan. Callers who choose to manage work area allocation within their application must use this call after plan generation, and after any cufftSet*() calls subsequent to plan generation, if those calls might alter the required work space size.
Declaration
public SizeT GetActualSize()
Returns
Type | Description |
---|---|
SizeT |
GetSize()
This call gives a more accurate estimate of the work area size required for a plan than cufftEstimate1d(), given the specified parameters, and taking into account any plan settings that may have been made.
Declaration
public SizeT GetSize()
Returns
Type | Description |
---|---|
SizeT |
SetAutoAllocation(Boolean)
SetAutoAllocation() indicates that the caller intends to allocate and manage work areas for plans that have been generated. CUFFT default behavior is to allocate the work area at plan generation time. If cufftSetAutoAllocation() has been called with autoAllocate set to "false" prior to one of the cufftMakePlan*() calls, CUFFT does not allocate the work area. This is the preferred sequence for callers wishing to manage work area allocation.
Declaration
public void SetAutoAllocation(bool autoAllocate)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | autoAllocate |
SetCompatibilityMode(Compatibility)
configures the layout of CUFFT output in FFTW‐compatible modes. When FFTW compatibility is desired, it can be configured for padding only, for asymmetric complex inputs only, or to be fully compatible.
Declaration
public void SetCompatibilityMode(Compatibility mode)
Parameters
Type | Name | Description |
---|---|---|
Compatibility | mode | The Compatibility option to be used |
SetStream(CUstream)
Associates a CUDA stream with a CUFFT plan. All kernel launches made during plan execution are now done through the associated stream, enabling overlap with activity in other streams (for example, data copying). The association remains until the plan is destroyed or the stream is changed with another call to SetStream().
Declaration
public void SetStream(CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CUstream | stream | A valid CUDA stream created with cudaStreamCreate() (or 0 for the default stream) |
SetWorkArea(CUdeviceptr)
SetWorkArea() overrides the work area pointer associated with a plan. If the work area was auto-allocated, CUFFT frees the auto-allocated space. The cufftExecute*() calls assume that the work area pointer is valid and that it points to a contiguous region in device memory that does not overlap with any other work area. If this is not the case, results are indeterminate.
Declaration
public void SetWorkArea(CUdeviceptr workArea)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | workArea |