JWS C Library
C language utility library
|
Declarations for matrix block FFT functions. More...
#include <jwsc/config.h>
#include <stdlib.h>
#include <inttypes.h>
#include <assert.h>
#include <math.h>
#include "jwsc/matblock/matblock.h"
#include "jwsc/matblock/matblock_math.h"
#include "jwsc/matblock/matblock_fft.h"
Go to the source code of this file.
Functions | |||||||||||||||||
expand_symmetric_matblock_dft | |||||||||||||||||
Takes advantage of the symmetry propery of the dft on real data: the number of columns in m_in is only half of m_out. More precisely, if (ncols_even) (*m_out)->num_cols == (m_in->num_cols-1) * 2 else (*m_out)->num_cols == (m_in->num_cols-1) * 2 + 1 See real_to_complex_dft_f() for information on how m_in came to be this way.
if (ncols_even) (*m_out)->num_cols == (m_in->num_cols-1) * 2 else (*m_out)->num_cols == (m_in->num_cols-1) * 2 + 1 See real_to_complex_dft_f() for information on how m_in came to be this way.
Expands the symmetric columns of a dft. | |||||||||||||||||
void | expand_symmetric_matblock_dft_f (Matblock_cf **m_out, const Matblock_cf *m_in, uint8_t ncols_even) | ||||||||||||||||
Expands the symmetric columns of a single precision dft. | |||||||||||||||||
void | expand_symmetric_matblock_dft_d (Matblock_cd **m_out, const Matblock_cd *m_in, uint8_t ncols_even) | ||||||||||||||||
Expands the symmetric columns of a double precision dft. | |||||||||||||||||
shrink_symmetric_matblock_dft | |||||||||||||||||
Shrinks the symmetric columns of a dft. | |||||||||||||||||
void | shrink_symmetric_matblock_dft_f (Matblock_cf **m_out, const Matblock_cf *m_in) | ||||||||||||||||
Shrinks the symmetric columns of a single precision dft. | |||||||||||||||||
void | shrink_symmetric_matblock_dft_d (Matblock_cd **m_out, const Matblock_cd *m_in) | ||||||||||||||||
Shrinks the symmetric columns of a double precision dft. | |||||||||||||||||
scale_matblock_dft | |||||||||||||||||
Scales the result of a real to complex to real dft operation. | |||||||||||||||||
void | scale_matblock_dft_f (Matblock_f **m_out, const Matblock_f *m_in) | ||||||||||||||||
Scales the single precision result of a real to complex to real dft operation. | |||||||||||||||||
void | scale_matblock_dft_d (Matblock_d **m_out, const Matblock_d *m_in) | ||||||||||||||||
Scales the double precision result of a real to complex to real dft operation. | |||||||||||||||||
shift_matblock_f | |||||||||||||||||
Shifts a matrix block so its diagonal quadrants are swapped. | |||||||||||||||||
void | shift_matblock_f (Matblock_f **m_out, const Matblock_f *m_in) | ||||||||||||||||
Shifts a single precision matrix block so its diagonal quadrants are swapped. | |||||||||||||||||
void | shift_matblock_d (Matblock_d **m_out, const Matblock_d *m_in) | ||||||||||||||||
Shifts a double precision matrix block so its diagonal quadrants are swapped. | |||||||||||||||||
void | shift_matblock_cf (Matblock_cf **m_out, const Matblock_cf *m_in) | ||||||||||||||||
Shifts a single precision complex matrix block so its diagonal quadrants are swapped. | |||||||||||||||||
void | shift_matblock_cd (Matblock_cd **m_out, const Matblock_cd *m_in) | ||||||||||||||||
Shifts a double precision complex matrix block so its diagonal quadrants are swapped. | |||||||||||||||||
unshift_matblock | |||||||||||||||||
Unshifts a matrix block that had its diagonal quadrants swapped. | |||||||||||||||||
void | unshift_matblock_f (Matblock_f **m_out, const Matblock_f *m_in) | ||||||||||||||||
Unshifts a single precision matrix block that had its diagonal quadrants swapped. | |||||||||||||||||
void | unshift_matblock_d (Matblock_d **m_out, const Matblock_d *m_in) | ||||||||||||||||
Unshifts a double precision matrix block that had its diagonal quadrants swapped. | |||||||||||||||||
void | unshift_matblock_cf (Matblock_cf **m_out, const Matblock_cf *m_in) | ||||||||||||||||
Unshifts a single precision complex matrix block that had its diagonal quadrants swapped. | |||||||||||||||||
void | unshift_matblock_cd (Matblock_cd **m_out, const Matblock_cd *m_in) | ||||||||||||||||
Unshifts a double precision complex matrix block that had its diagonal quadrants swapped. |
Declarations for matrix block FFT functions.
If FFTW3 was built to use SIMD instrinctions, the real to complex and complex to real dft routines are accelerated. For the double precision routines, however, only SSE2 ISA extensions are supported.
Definition in file matblock_fft.c.
void expand_symmetric_matblock_dft_f | ( | Matblock_cf ** | m_out, |
const Matblock_cf * | m_in, | ||
uint8_t | ncols_even | ||
) |
Expands the symmetric columns of a single precision dft.
m_out | Result parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used. |
m_in | Complex matrix block to expand. |
ncols_even | Boolean parameter: 0 if the number of columns to expand m_in to is odd; otherwise even. |
Definition at line 500 of file matblock_fft.c.
void expand_symmetric_matblock_dft_d | ( | Matblock_cd ** | m_out, |
const Matblock_cd * | m_in, | ||
uint8_t | ncols_even | ||
) |
Expands the symmetric columns of a double precision dft.
m_out | Result parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used. |
m_in | Complex matrix block to expand. |
ncols_even | Boolean parameter: 0 if the number of columns to expand m_in to is odd; otherwise even. |
Definition at line 560 of file matblock_fft.c.
void shrink_symmetric_matblock_dft_f | ( | Matblock_cf ** | m_out, |
const Matblock_cf * | m_in | ||
) |
Shrinks the symmetric columns of a single precision dft.
m_out | Result parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used. |
m_in | Complex matrix block to shrink. |
Definition at line 630 of file matblock_fft.c.
void shrink_symmetric_matblock_dft_d | ( | Matblock_cd ** | m_out, |
const Matblock_cd * | m_in | ||
) |
Shrinks the symmetric columns of a double precision dft.
m_out | Result parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used. |
m_in | Complex matrix block to expand. |
Definition at line 663 of file matblock_fft.c.
void scale_matblock_dft_f | ( | Matblock_f ** | m_out, |
const Matblock_f * | m_in | ||
) |
Scales the single precision result of a real to complex to real dft operation.
The FFT calculations are unscaled, so doing a real to complex to real operation results in an unscaled real matrix block. This function applies the proper scaling to undo this effect.
m_out | Result parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used. |
m_in | Matrix block to scale. |
Definition at line 711 of file matblock_fft.c.
void scale_matblock_dft_d | ( | Matblock_d ** | m_out, |
const Matblock_d * | m_in | ||
) |
Scales the double precision result of a real to complex to real dft operation.
The FFT calculations are unscaled, so doing a real to complex to real operation results in an unscaled real matrix block. This function applies the proper scaling to undo this effect.
m_out | Result parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used. |
m_in | Matrix block to scale. |
Definition at line 730 of file matblock_fft.c.
void shift_matblock_f | ( | Matblock_f ** | m_out, |
const Matblock_f * | m_in | ||
) |
Shifts a single precision matrix block so its diagonal quadrants are swapped.
m_out | Result parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used. |
m_in | Matrix block to shift. |
Definition at line 760 of file matblock_fft.c.
void shift_matblock_d | ( | Matblock_d ** | m_out, |
const Matblock_d * | m_in | ||
) |
Shifts a double precision matrix block so its diagonal quadrants are swapped.
m_out | Result parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used. |
m_in | Matrix block to shift. |
Definition at line 898 of file matblock_fft.c.
void shift_matblock_cf | ( | Matblock_cf ** | m_out, |
const Matblock_cf * | m_in | ||
) |
Shifts a single precision complex matrix block so its diagonal quadrants are swapped.
m_out | Result parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used. |
m_in | Matrix block to shift. |
Definition at line 1036 of file matblock_fft.c.
void shift_matblock_cd | ( | Matblock_cd ** | m_out, |
const Matblock_cd * | m_in | ||
) |
Shifts a double precision complex matrix block so its diagonal quadrants are swapped.
m_out | Result parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used. |
m_in | Matrix block to shift. |
Definition at line 1174 of file matblock_fft.c.
void unshift_matblock_f | ( | Matblock_f ** | m_out, |
const Matblock_f * | m_in | ||
) |
Unshifts a single precision matrix block that had its diagonal quadrants swapped.
m_out | Result parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used. |
m_in | Matrix block to unshift. |
Definition at line 1324 of file matblock_fft.c.
void unshift_matblock_d | ( | Matblock_d ** | m_out, |
const Matblock_d * | m_in | ||
) |
Unshifts a double precision matrix block that had its diagonal quadrants swapped.
m_out | Result parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used. |
m_in | Matrix block to unshift. |
Definition at line 1462 of file matblock_fft.c.
void unshift_matblock_cf | ( | Matblock_cf ** | m_out, |
const Matblock_cf * | m_in | ||
) |
Unshifts a single precision complex matrix block that had its diagonal quadrants swapped.
m_out | Result parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used. |
m_in | Matrix block to unshift. |
Definition at line 1600 of file matblock_fft.c.
void unshift_matblock_cd | ( | Matblock_cd ** | m_out, |
const Matblock_cd * | m_in | ||
) |
Unshifts a double precision complex matrix block that had its diagonal quadrants swapped.
m_out | Result parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used. |
m_in | Matrix block to unshift. |
Definition at line 1738 of file matblock_fft.c.