JWS C Library
C language utility library
matblock_fft.h File Reference

Declarations for matrix block FFT functions. More...

#include <jwsc/config.h>
#include <stdlib.h>
#include "jwsc/matblock/matblock.h"
Include dependency graph for matblock_fft.h:

Go to the source code of this file.

Functions

expand_symmetric_matblock_dft

Computes a single precision real matrix block from a complex discrete Fourier transform using a scratch buffer.

Computes a double precision real matrix block from a complex discrete Fourier transform using a scratch buffer.

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

Shifts a matblock 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.

Detailed Description

Declarations for matrix block FFT functions.

Author:
Joseph Schlecht
License:
Creative Commons BY-NC-SA 3.0

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.h.


Function Documentation

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.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inComplex matrix block to expand.
ncols_evenBoolean parameter: 0 if the number of columns to expand m_in to is odd; otherwise even.
Note:
If *m_out == m_in, then m_in is overwritten.

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.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inComplex matrix block to expand.
ncols_evenBoolean parameter: 0 if the number of columns to expand m_in to is odd; otherwise even.
Note:
If *m_out == m_in, then m_in is overwritten.

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.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inComplex matrix block to shrink.
Note:
If *m_out == m_in, then m_in is overwritten.

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.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inComplex matrix block to expand.
Note:
If *m_out == m_in, then m_in is overwritten.

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.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to scale.
Note:
If *m_out == m_in, then m_in is overwritten.

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.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to scale.
Note:
If *m_out == m_in, then m_in is overwritten.

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.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to shift.
Note:
If *m_out == m_in, then m_in is overwritten.
Use unshift_matblock_f() to undo the 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.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to shift.
Note:
If *m_out == m_in, then m_in is overwritten.
Use unshift_matblock_d() to undo the 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.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to shift.
Note:
If *m_out == m_in, then m_in is overwritten.
Use unshift_matblock_cf() to undo the 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.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to shift.
Note:
If *m_out == m_in, then m_in is overwritten.
Use unshift_matblock_cd() to undo the 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.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to unshift.
Note:
If *m_out == m_in, then m_in is overwritten.
Undoes the effects of shift_matblock_f().

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.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to unshift.
Note:
If *m_out == m_in, then m_in is overwritten.
Undoes the effects of shift_matblock_d().

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.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to unshift.
Note:
If *m_out == m_in, then m_in is overwritten.
Undoes the effects of shift_matblock_cf().

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.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix block is allocated; otherwise its space is re-used.
m_inMatrix block to unshift.
Note:
If *m_out == m_in, then m_in is overwritten.
Undoes the effects of shift_matblock_cd().

Definition at line 1738 of file matblock_fft.c.