cufft-0.10.0.0: Haskell bindings for the CUFFT library
Copyright[2013..2018] Robert Clifton-Everest Trevor L. McDonell
LicenseBSD
MaintainerTrevor L. McDonell <tmcdonell@cse.unsw.edu.au>
Stabilityexperimental
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell98

Foreign.CUDA.FFT

Description

The cuFFT library is an implementation of Fast Fourier Transform (FFT) operations for NVIDIA GPUs.

The FFT is a divide-and-conquer algorithm for efficiently computing discrete Fourier transforms of real- or complex-valued data sets. It is one of the most important and widely used numerical algorithms in computational physics and general signals processing. The cuFFT library provides a simple interface for computing FFTs on a NVIDIA GPU.

To use operations from the cuFFT library, the user must allocate the required arrays in the GPU memory space, fill them with data, call the desired sequence of cuFFT library functions, then copy the results from the GPU memory back to the host.

The cuda package can be used for writing to and retrieving data from the GPU.

Example

_TODO_

Additional information

For more information, see the NVIDIA cuFFT documentation:

http://docs.nvidia.com/cuda/cufft/index.html

Synopsis

Control

data Type Source #

The cuFFT library supports complex- and real-valued transforms. This data type enumerates the kind of transform a plan will execute.

Key:

  • R: real (32-bit float)
  • D: double (64-bit float)
  • C: single-precision complex numbers (32-bit, interleaved)
  • Z: double-precision complex numbers (64-bit, interleaved)

Constructors

C2C 
R2C 
C2R 
Z2Z 
D2Z 
Z2D 

Instances

Instances details
Enum Type Source # 
Instance details

Defined in Foreign.CUDA.FFT.Plan

Methods

succ :: Type -> Type #

pred :: Type -> Type #

toEnum :: Int -> Type #

fromEnum :: Type -> Int #

enumFrom :: Type -> [Type] #

enumFromThen :: Type -> Type -> [Type] #

enumFromTo :: Type -> Type -> [Type] #

enumFromThenTo :: Type -> Type -> Type -> [Type] #

Eq Type Source # 
Instance details

Defined in Foreign.CUDA.FFT.Plan

Methods

(==) :: Type -> Type -> Bool #

(/=) :: Type -> Type -> Bool #

Show Type Source # 
Instance details

Defined in Foreign.CUDA.FFT.Plan

Methods

showsPrec :: Int -> Type -> ShowS #

show :: Type -> String #

showList :: [Type] -> ShowS #

newtype Handle Source #

A handle used to store and access cuFFT plans.

A handle is created by the FFT planning functions (e.g. plan1D) and used during execution of the transforms (e.g. execC2C).

The handle may be reused, but should be destroyed once it is no longer required, in order to release associated GPU memory and other resources.

Constructors

Handle CInt 

plan1D Source #

Arguments

:: Int

Size of the transformation

-> Type

Transformation data type

-> Int

Number of one-dimensional transforms to configure

-> IO Handle 

Creates a 1D FFT plan configured for a specified signal size and data type.

The third argument tells cuFFT how many 1D transforms, of size given by the first argument, to configure. Consider using planMany for multiple transforms instead.

http://docs.nvidia.com/cuda/cufft/index.html#function-cufftplan1d

plan2D Source #

Arguments

:: Int

The transform size in the x-dimension. This is the slowest changing dimension of a transform (strided in memory)

-> Int

The transform size in the y-dimension. This is the fastest changing dimension of a transform (contiguous in memory)

-> Type

Transformation data type

-> IO Handle 

Creates a 2D FFT plan configuration for a specified signal size and data type.

http://docs.nvidia.com/cuda/cufft/index.html#function-cufftplan2d

plan3D Source #

Arguments

:: Int

The transform size in the x-dimension. This is the slowest changing dimension of the transform (strided in memory)

-> Int

The transform size in the y-dimension.

-> Int

The transform size in the z-dimension. This is the fastest changing dimension of the transform (contiguous in memory)

-> Type

Transformation data type

-> IO Handle 

Creates a 3D FFT plan configuration for a specified signal size and data type.

http://docs.nvidia.com/cuda/cufft/index.html#function-cufftplan3d

planMany Source #

Arguments

:: [Int]

The size of the transform in each dimension, where (n !! 0) is the size of the outermost dimension, and (n !! rank-1) the size of the innermost (contiguous) dimension of the transform.

-> Maybe ([Int], Int, Int)

Input data layout. If Nothing, the data is assumed to be contiguous.

-> Maybe ([Int], Int, Int)

Output data layout. If Nothing, the data is stored contiguously.

-> Type

Transformation type

-> Int

Batch size for this transform

-> IO Handle 

Creates a batched plan configuration for many signals of a specified size and data type in either 1, 2 or 3 dimensions.

This function supports more complicated input and output data layouts. If not specified (that is, Nothing is passed for either of the second or third parameters), contiguous data arrays are assumed.

Data layout configuration consists of three fields, respectively:

  • storage dimensions of the input data in memory
  • the distance between two successive input elements in the innermost (least significant) dimension
  • the distance between the first element of two consecutive signals in a batch of the input data

http://docs.nvidia.com/cuda/cufft/index.html#function-cufftplanmany

destroy :: Handle -> IO () Source #

Release resources associated with the given plan. This function should be called once a plan is no longer needed, to avoid wasting GPU memory.

http://docs.nvidia.com/cuda/cufft/index.html#function-cufftdestroy

Operations