edu.stanford.rsl.konrad.cuda
Class CUDAFFTVolumeHandle

java.lang.Object
  extended by edu.stanford.rsl.konrad.volume3d.FFTVolumeHandle
      extended by edu.stanford.rsl.konrad.cuda.CUDAFFTVolumeHandle

public class CUDAFFTVolumeHandle
extends FFTVolumeHandle


Nested Class Summary
static class CUDAFFTVolumeHandle.CUFFTResult
           
 
Constructor Summary
CUDAFFTVolumeHandle(VolumeOperator operator)
           
 
Method Summary
 void cleanUp()
          Cleans up the memory.
 void forwardTransform(jcuda.Pointer deviceX, int[] size)
          Performs a forward 3-D FFT on the given volume in the CUDA memory.
 void forwardTransform(Volume3D vol)
          Performs a forward Fast Fourier Transform of the Volume
static CUDAFFTVolumeHandle.CUFFTResult getResultEnum(int i)
           
 void inverseTransform(jcuda.Pointer deviceX, int[] size)
          Performs an inverse 3-D FFT on the CUDA device memory pointed to by deviceX.
 void inverseTransform(Volume3D vol)
          Performs a normalized inverse Fast Fourier Transform of the Volume
 void setThreadNumber(int number)
          Sets the maximal number of threads used for the FFT.
static float[] toCUDAFormat(float[][][] hostVolume)
           
static float[][][] toHostFormat(float[] cuda, int[] size)
           
 
Methods inherited from class edu.stanford.rsl.konrad.volume3d.FFTVolumeHandle
setVolumeOperator
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CUDAFFTVolumeHandle

public CUDAFFTVolumeHandle(VolumeOperator operator)
Method Detail

getResultEnum

public static CUDAFFTVolumeHandle.CUFFTResult getResultEnum(int i)

toHostFormat

public static float[][][] toHostFormat(float[] cuda,
                                       int[] size)

toCUDAFormat

public static float[] toCUDAFormat(float[][][] hostVolume)

forwardTransform

public void forwardTransform(jcuda.Pointer deviceX,
                             int[] size)
                      throws java.lang.Exception
Performs a forward 3-D FFT on the given volume in the CUDA memory.

Parameters:
deviceX - the Pointer to the device's memory
size - the sizes of the volume
Throws:
java.lang.Exception - may happen.

forwardTransform

public void forwardTransform(Volume3D vol)
Description copied from class: FFTVolumeHandle
Performs a forward Fast Fourier Transform of the Volume

Specified by:
forwardTransform in class FFTVolumeHandle
Parameters:
vol - the Volume

inverseTransform

public void inverseTransform(jcuda.Pointer deviceX,
                             int[] size)
                      throws java.lang.Exception
Performs an inverse 3-D FFT on the CUDA device memory pointed to by deviceX.

Parameters:
deviceX - the device pointer
size - the sizes of the volume.
Throws:
java.lang.Exception - may happen.

inverseTransform

public void inverseTransform(Volume3D vol)
Description copied from class: FFTVolumeHandle
Performs a normalized inverse Fast Fourier Transform of the Volume

Specified by:
inverseTransform in class FFTVolumeHandle
Parameters:
vol - the Volume

cleanUp

public void cleanUp()
Description copied from class: FFTVolumeHandle
Cleans up the memory. Relevant for FFT implementations which depend on native code.

Specified by:
cleanUp in class FFTVolumeHandle

setThreadNumber

public void setThreadNumber(int number)
Description copied from class: FFTVolumeHandle
Sets the maximal number of threads used for the FFT.

Specified by:
setThreadNumber in class FFTVolumeHandle