scitbx::fftpack Namespace Reference

Fast Fourier Transformations based on FFTPACK. More...


Classes

class  complex_to_complex
 Complex-to-complex Fast Fourier Transformation. More...
class  complex_to_complex_2d
 2-dimensional complex-to-complex Fast Fourier Transformation. More...
class  complex_to_complex_3d
 3-dimensional complex-to-complex Fast Fourier Transformation. More...
class  factorization
 Determination of prime factors for both complex-to-complex and real-to-complex transforms. More...
class  real_to_complex
 Real-to-complex Fast Fourier Transformation. More...
class  real_to_complex_3d
 3-dimensional real-to-complex Fast Fourier Transformation. More...

Functions

template<typename IntegerType>
bool check_max_prime (const IntegerType &max_prime, const IntegerType &n)
template<typename IntegerType>
IntegerType adjust_gridding (const IntegerType &min_grid, IntegerType max_prime, IntegerType mandatory_factor=1)
template<typename IntegerArrayType>
IntegerArrayType adjust_gridding_array (const IntegerArrayType &min_grid, const typename IntegerArrayType::value_type &max_prime)
template<typename IntegerArrayType>
IntegerArrayType adjust_gridding_array (const IntegerArrayType &min_grid, const typename IntegerArrayType::value_type &max_prime, const IntegerArrayType &mandatory_factors)
template<typename IntegerArrayType>
IntegerArrayType adjust_gridding_array_flex (IntegerArrayType const &min_grid, typename IntegerArrayType::value_type const &max_prime)
template<typename IntegerArrayType>
IntegerArrayType adjust_gridding_array_flex (IntegerArrayType const &min_grid, typename IntegerArrayType::value_type const &max_prime, IntegerArrayType const &mandatory_factors)
std::size_t n_complex_from_n_real (std::size_t n_real)
 Length of a real-to-complex sequence given length of the real sequence.
std::size_t m_real_from_n_real (std::size_t n_real)
 Minimum array dimension for a real-to-complex sequence as number of real values, given length of the real sequence.
template<typename IntegerType, std::size_t D>
af::tiny< IntegerType, D > n_complex_from_n_real (const af::tiny< IntegerType, D > &n_real)
 Physical dimensions of 3-dimensional real-to-complex array as complex array, given generic dimensions of real array.
template<typename IntegerType, std::size_t D>
af::tiny< IntegerType, D > n_real_from_n_complex (const af::tiny< IntegerType, D > &n_complex)
 Physical dimensions of 3-dimensional real-to-complex array as real array, given generic dimensions of complex array.
template<typename IntegerType, std::size_t D>
af::tiny< IntegerType, D > m_real_from_n_real (const af::tiny< IntegerType, D > &n_real)
 Physical dimensions of 3-dimensional real-to-complex array as real array, given generic dimensions of real array.


Detailed Description

Fast Fourier Transformations based on FFTPACK.

The Fast Fourier Transform toolbox provides 1-dimensional and 3-dimensional in-place complex-to-complex and real-to-complex transforms. There are no restrictions on the lengths of the sequences to be transformed. However, the transforms are most efficient when the sequence length is a product of 2, 3 and 5.

scitbx/fftpack is a pure C++ adaption of the complex-to-complex and real-to-complex transforms of FFTPACK Version 4.1 (Nov 1988) by Paul Swarztrauber (see http://www.scd.ucar.edu/softlib/FFTPACK.html and the references below).

The core of scitbx/fftpack is implemented exclusively in C++ header files. Therefore it is not necessary to link with a support library. Only the optional Python bindings that are provided for convenience need to be compiled.

scitbx/fftpack is reasonably fast on the machines where it was tested (Tru64 Unix, Linux, Windows with Visual C++ 6), but is not as fast as FFTW (http://www.fftw.org/). Depending on the machine, compiler settings, transform lengths and the dimensionality (1D or 3D), scitbx/fftpack is about 30-300% slower than FFTW for transform lengths that are a multiple of 2, 3 and 5. This is no surprise, since FFTW is a very sophisticated library that adjusts itself to a particular hardware, and was developed specifically for modern, cache-based architectures. In particular, the performance on Athlon Linux machines is very impressive. Unfortunately, the FFTW license does not permit the inclusion in an Open Source project (the GNU General Public License is too restrictive). Therefore the public domain FFTPACK was chosen as the basis for scitbx/fftpack.

It is hoped that scitbx/fftpack facilitates the development of an elegant, generic C++ interface for Fast Fourier Transforms. Once such an interface is worked out, it should be easy to provide implementations with different core transform algorithms, such as FFTW.

References:


Function Documentation

af::tiny<IntegerType, D> scitbx::fftpack::m_real_from_n_real ( const af::tiny< IntegerType, D > &  n_real  )  [inline]

Physical dimensions of 3-dimensional real-to-complex array as real array, given generic dimensions of real array.

The real-to-complex array contains product(n_complex) complex values, i.e. product(2*n_complex) real values.

See also: n_complex_from_n_real()

References m_real_from_n_real().

std::size_t scitbx::fftpack::m_real_from_n_real ( std::size_t  n_real  )  [inline]

Minimum array dimension for a real-to-complex sequence as number of real values, given length of the real sequence.

Equivalent to 2 * n_complex_from_n_real(n_real).

References n_complex_from_n_real().

Referenced by real_to_complex_3d< FloatType >::m_real(), and m_real_from_n_real().

af::tiny<IntegerType, D> scitbx::fftpack::n_complex_from_n_real ( const af::tiny< IntegerType, D > &  n_real  )  [inline]

Physical dimensions of 3-dimensional real-to-complex array as complex array, given generic dimensions of real array.

The real-to-complex array contains product(n_complex) complex values, i.e. product(2*n_complex) real values.

See also: m_real_from_n_real()

References n_complex_from_n_real().

std::size_t scitbx::fftpack::n_complex_from_n_real ( std::size_t  n_real  )  [inline]

Length of a real-to-complex sequence given length of the real sequence.

n_complex = n_real / 2 + 1. I.e., for even n_real, the real-to-complex transformed sequence viewed as consecutive real numbers (real and imaginary parts) contains two additional slots for the given floating-point type. For odd n_real, the complex sequence contains one additional slot.

Referenced by m_real_from_n_real(), real_to_complex_3d< FloatType >::n_complex(), and n_complex_from_n_real().

af::tiny<IntegerType, D> scitbx::fftpack::n_real_from_n_complex ( const af::tiny< IntegerType, D > &  n_complex  )  [inline]

Physical dimensions of 3-dimensional real-to-complex array as real array, given generic dimensions of complex array.

The real-to-complex array contains product(n_complex) complex values, i.e. product(2*n_complex) real values.

See also: n_complex_from_n_real()


Generated on Thu Jun 19 15:35:08 2014 for cctbx by  doxygen 1.5.6