cufft-0.8.0.0: Haskell bindings for the CUFFT library

Safe HaskellNone
LanguageHaskell98

Foreign.CUDA.FFT

Contents

Synopsis

Documentation

cufftError :: String -> IO a Source #

Raise a CUFFTException in the IO Monad

resultIfOk :: (Result, a) -> IO a Source #

Return the results of a function on successful execution, otherwise throw an exception with an error string associated with the return code

nothingIfOk :: Result -> IO () Source #

Throw an exception with an error string associated with an unsuccessful return code, otherwise return unit.

execC2C :: Handle -> DevicePtr Float -> DevicePtr Float -> Int -> IO () Source #

Executes a single-precision complex-to-complex transform plan in the transform direction specified by the fourth argument

execZ2Z :: Handle -> DevicePtr Double -> DevicePtr Double -> Int -> IO () Source #

Executes a double-precision complex-to-complex transform plan in the transform direction specified by the fourth argument

execR2C :: Handle -> DevicePtr Float -> DevicePtr Float -> IO () Source #

Executes a single-precision real-to-complex (implicitly forward) transform plan

execD2Z :: Handle -> DevicePtr Double -> DevicePtr Double -> IO () Source #

Executes a double-precision real-to-complex (implicitly forward) transform plan

execC2R :: Handle -> DevicePtr Float -> DevicePtr Float -> IO () Source #

Executes a single-precision complex-to-real (implicitly forward) transform plan

execZ2D :: Handle -> DevicePtr Double -> DevicePtr Double -> IO () Source #

Executes a double-precision complex-to-real (implicitly forward) transform plan

Context

newtype Handle Source #

Operations handle

Constructors

Handle 

Fields

data Type Source #

Constructors

C2C 
R2C 
C2R 
Z2Z 
D2Z 
Z2D 

Instances

Enum Type Source #

Creates a 1D FFT plan configuration for a specified signal size and data type. The third argument tells CUFFT how many 1D transforms to configure.

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 # 

Methods

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

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

Show Type Source # 

Methods

showsPrec :: Int -> Type -> ShowS #

show :: Type -> String #

showList :: [Type] -> ShowS #

plan2D :: Int -> Int -> Type -> IO Handle Source #

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

plan3D :: Int -> Int -> Int -> Type -> IO Handle Source #

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

planMany Source #

Arguments

:: [Int]

The size of each dimension

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

Storage dimensions of the output data, the stride, and the distance between signals for the input data

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

As above but for the output data

-> Type

The type of the transformation.

-> Int

The batch size (either 1, 2 or 3)

-> IO Handle 

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

destroy :: Handle -> IO () Source #

This function releases hardware resources used by the CUFFT plan. The release of GPU resources may be deferred until the application exits. This function is usually the last call with a particular handle to the CUFFT plan.

Streamed transforms

setStream :: Handle -> Stream -> IO () Source #

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 (e.g. data copying). The association remains until the plan is destroyed or the stream is changed.