JWS C Library
C language utility library
|
Declarations for matrix FFT functions. More...
#include <jwsc/config.h>
#include <stdlib.h>
#include <inttypes.h>
#include <assert.h>
#include <math.h>
#include "jwsc/matrix/matrix.h"
#include "jwsc/matrix/matrix_math.h"
Go to the source code of this file.
Functions | |||||||||||||
expand_symmetric_matrix_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_matrix_dft_f (Matrix_cf **m_out, const Matrix_cf *m_in, uint8_t ncols_even) | ||||||||||||
Expands the symmetric columns of a single precision dft. | |||||||||||||
void | expand_symmetric_matrix_dft_d (Matrix_cd **m_out, const Matrix_cd *m_in, uint8_t ncols_even) | ||||||||||||
Expands the symmetric columns of a double precision dft. | |||||||||||||
shrink_symmetric_matrix_dft | |||||||||||||
Shrinks the symmetric columns of a dft. | |||||||||||||
void | shrink_symmetric_matrix_dft_f (Matrix_cf **m_out, const Matrix_cf *m_in) | ||||||||||||
Shrinks the symmetric columns of a single precision dft. | |||||||||||||
void | shrink_symmetric_matrix_dft_d (Matrix_cd **m_out, const Matrix_cd *m_in) | ||||||||||||
Shrinks the symmetric columns of a double precision dft. | |||||||||||||
scale_matrix_dft | |||||||||||||
Scales the result of a real to complex to real dft operation. | |||||||||||||
void | scale_matrix_dft_f (Matrix_f **m_out, const Matrix_f *m_in) | ||||||||||||
Scales the single precision result of a real to complex to real dft operation. | |||||||||||||
void | scale_matrix_dft_d (Matrix_d **m_out, const Matrix_d *m_in) | ||||||||||||
Scales the double precision result of a real to complex to real dft operation. | |||||||||||||
shift_matrix_f | |||||||||||||
Shifts a matrix so its diagonal quadrants are swapped. | |||||||||||||
void | shift_matrix_f (Matrix_f **m_out, const Matrix_f *m_in) | ||||||||||||
Shifts a single precision matrix so its diagonal quadrants are swapped. | |||||||||||||
void | shift_matrix_d (Matrix_d **m_out, const Matrix_d *m_in) | ||||||||||||
Shifts a double precision matrix so its diagonal quadrants are swapped. | |||||||||||||
void | shift_matrix_cf (Matrix_cf **m_out, const Matrix_cf *m_in) | ||||||||||||
Shifts a single precision complex matrix so its diagonal quadrants are swapped. | |||||||||||||
void | shift_matrix_cd (Matrix_cd **m_out, const Matrix_cd *m_in) | ||||||||||||
Shifts a double precision complex matrix so its diagonal quadrants are swapped. | |||||||||||||
unshift_matrix | |||||||||||||
Unshifts a matrix that had its diagonal quadrants swapped. | |||||||||||||
void | unshift_matrix_f (Matrix_f **m_out, const Matrix_f *m_in) | ||||||||||||
Unshifts a single precision matrix that had its diagonal quadrants swapped. | |||||||||||||
void | unshift_matrix_d (Matrix_d **m_out, const Matrix_d *m_in) | ||||||||||||
Unshifts a double precision matrix that had its diagonal quadrants swapped. | |||||||||||||
void | unshift_matrix_cf (Matrix_cf **m_out, const Matrix_cf *m_in) | ||||||||||||
Unshifts a single precision complex matrix that had its diagonal quadrants swapped. | |||||||||||||
void | unshift_matrix_cd (Matrix_cd **m_out, const Matrix_cd *m_in) | ||||||||||||
Unshifts a double precision complex matrix that had its diagonal quadrants swapped. |
Declarations for matrix 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 matrix_fft.c.
void expand_symmetric_matrix_dft_f | ( | Matrix_cf ** | m_out, |
const Matrix_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 is allocated; otherwise its space is re-used. |
m_in | Complex matrix to expand. |
ncols_even | Boolean parameter: 0 if the number of columns to expand m_in to is odd; otherwise even. |
Definition at line 327 of file matrix_fft.c.
void expand_symmetric_matrix_dft_d | ( | Matrix_cd ** | m_out, |
const Matrix_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 is allocated; otherwise its space is re-used. |
m_in | Complex matrix to expand. |
ncols_even | Boolean parameter: 0 if the number of columns to expand m_in to is odd; otherwise even. |
Definition at line 382 of file matrix_fft.c.
Shrinks the symmetric columns of a single precision dft.
m_out | Result parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used. |
m_in | Complex matrix to shrink. |
Definition at line 446 of file matrix_fft.c.
Shrinks the symmetric columns of a double precision dft.
m_out | Result parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used. |
m_in | Complex matrix to expand. |
Definition at line 474 of file matrix_fft.c.
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. This function applies the proper scaling to undo this effect.
m_out | Result parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used. |
m_in | Matrix to scale. |
Definition at line 518 of file matrix_fft.c.
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. This function applies the proper scaling to undo this effect.
m_out | Result parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used. |
m_in | Matrix to scale. |
Definition at line 537 of file matrix_fft.c.
Shifts a single precision matrix so its diagonal quadrants are swapped.
m_out | Result parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used. |
m_in | Matrix to shift. |
Definition at line 567 of file matrix_fft.c.
Shifts a double precision matrix so its diagonal quadrants are swapped.
m_out | Result parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used. |
m_in | Matrix to shift. |
Definition at line 647 of file matrix_fft.c.
Shifts a single precision complex matrix so its diagonal quadrants are swapped.
m_out | Result parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used. |
m_in | Matrix to shift. |
Definition at line 727 of file matrix_fft.c.
Shifts a double precision complex matrix so its diagonal quadrants are swapped.
m_out | Result parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used. |
m_in | Matrix to shift. |
Definition at line 807 of file matrix_fft.c.
Unshifts a single precision matrix that had its diagonal quadrants swapped.
m_out | Result parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used. |
m_in | Matrix to unshift. |
Definition at line 899 of file matrix_fft.c.
Unshifts a double precision matrix that had its diagonal quadrants swapped.
m_out | Result parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used. |
m_in | Matrix to unshift. |
Definition at line 979 of file matrix_fft.c.
Unshifts a single precision complex matrix that had its diagonal quadrants swapped.
m_out | Result parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used. |
m_in | Matrix to unshift. |
Definition at line 1059 of file matrix_fft.c.
Unshifts a double precision complex matrix that had its diagonal quadrants swapped.
m_out | Result parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used. |
m_in | Matrix to unshift. |
Definition at line 1139 of file matrix_fft.c.