MIDAPACK - MIcrowave Data Analysis PACKage
1.1b
Parallel software tools for high performance CMB DA analysis
|
Functions | |
int | tpltz_init (int n, int lambda, int *nfft, int *blocksize, fftw_complex **T_fft, double *T, fftw_complex **V_fft, double **V_rfft, fftw_plan *plan_f, fftw_plan *plan_b, Flag flag_stgy) |
Sets a block size and initializes all fftw arrays and plans needed for the computation. | |
int | tpltz_cleanup (fftw_complex **T_fft, fftw_complex **V_fft, double **V_rfft, fftw_plan *plan_f, fftw_plan *plan_b) |
Cleans fftw workspace used in the Toeplitz matrix matrix product's computation. | |
int | reset_gaps (double **V, int id0, int local_V_size, int m, int nrow, int m_rowwise, int64_t *id0gap, int *lgap, int ngap) |
Set the data to zeros at the gaps location. | |
int | gap_masking (double **V, int l, int *id0gap, int *lgap, int ngap) |
Reduce the vector and mask the defined gaps. | |
int | gap_filling (double **V, int l, int *id0gap, int *lgap, int ngap) |
Extend the vector and add zeros on the gaps locations. | |
int | stmm (double **V, int n, int m, double *T, int lambda, Flag flag_stgy) |
Perform the product of a Toeplitz matrix by a general matrix using the sliding window algorithm. | |
int | gstbmm (double **V, int nrow, int m_cw, int m_rw, Block *tpltzblocks, int nb_blocks, int64_t idp, int local_V_size, int64_t *id0gap, int *lgap, int ngap, Flag flag_stgy) |
Performs the multiplication of a symmetric, Toeplitz block-diagonal matrix with gaps, T, by an arbitrary matrix, V, distributed over processes. |
These are shared-memory routines.
int tpltz_init | ( | int | n, |
int | lambda, | ||
int * | nfft, | ||
int * | blocksize, | ||
fftw_complex ** | T_fft, | ||
double * | T, | ||
fftw_complex ** | V_fft, | ||
double ** | V_rfft, | ||
fftw_plan * | plan_f, | ||
fftw_plan * | plan_b, | ||
Flag | flag_stgy | ||
) |
Sets a block size and initializes all fftw arrays and plans needed for the computation.
Initializes the fftw arrays and plans is necessary before any computation of the Toeplitz matrix matrix product. Use tpltz_cleanup afterwards.
n | row size of the matrix used for later product |
lambda | Toeplitz band width |
nfft | maximum number of FFTs you want to compute at the same time |
blocksize | optimal block size used in the sliding window algorithm to compute an optimize value) |
T_fft | complex array used for FFTs |
T | Toeplitz matrix |
V_fft | complex array used for FFTs |
V_rfft | real array used for FFTs |
plan_f | fftw plan forward (r2c) |
plan_b | fftw plan backward (c2r) |
Definition at line 257 of file toeplitz.c.
int tpltz_cleanup | ( | fftw_complex ** | T_fft, |
fftw_complex ** | V_fft, | ||
double ** | V_rfft, | ||
fftw_plan * | plan_f, | ||
fftw_plan * | plan_b | ||
) |
Cleans fftw workspace used in the Toeplitz matrix matrix product's computation.
Destroy fftw plans, free memory and reset fftw workspace.
T_fft | complex array used for FFTs |
V_fft | complex array used for FFTs |
V_rfft | real array used for FFTs |
plan_f | fftw plan forward (r2c) |
plan_b | fftw plan backward (c2r) |
Definition at line 435 of file toeplitz.c.
int reset_gaps | ( | double ** | V, |
int | id0, | ||
int | local_V_size, | ||
int | m, | ||
int | nrow, | ||
int | m_rowwise, | ||
int64_t * | id0gap, | ||
int * | lgap, | ||
int | ngap | ||
) |
Set the data to zeros at the gaps location.
The datas located on a gap are set to zeros. The gaps are defined in the time space, meaning their indexes are defined in the row dimension.
Definition at line 189 of file toeplitz_gappy.c.
int gap_masking | ( | double ** | V, |
int | l, | ||
int * | id0gap, | ||
int * | lgap, | ||
int | ngap | ||
) |
Reduce the vector and mask the defined gaps.
V | input/output vector |
l | length of the vector |
id0gap | gap first index |
lgap | gap length |
ngap | number of gaps |
Definition at line 255 of file toeplitz_gappy_seq.dev.c.
int gap_filling | ( | double ** | V, |
int | l, | ||
int * | id0gap, | ||
int * | lgap, | ||
int | ngap | ||
) |
Extend the vector and add zeros on the gaps locations.
V | input/output vector |
l | length of the extend vector |
id0gap | gap first index |
lgap | gap length |
ngap | number of gaps |
Definition at line 293 of file toeplitz_gappy_seq.dev.c.
int stmm | ( | double ** | V, |
int | n, | ||
int | m, | ||
double * | T, | ||
int | lambda, | ||
Flag | flag_stgy | ||
) |
Perform the product of a Toeplitz matrix by a general matrix using the sliding window algorithm.
This is a simplifed call of the sequential product including initialization and cleaning. This use the flag parameters to set the comutational options.
V | [input] data matrix (with the convention V(i,j)=V[i+j*n]) ; [out] result of the product TV |
n | number of rows of V |
m | number of columns of V |
m | number of columns of V |
T | Toeplitz matrix data composed of the non-zero entries of his first row |
lambda | number of non-zero in the first row of the Toeplitz and size of T |
flag_stgy | flag strategy for the product computation |
Definition at line 72 of file toeplitz_seq.c.
int gstbmm | ( | double ** | V, |
int | nrow, | ||
int | m_cw, | ||
int | m_rw, | ||
Block * | tpltzblocks, | ||
int | nb_blocks, | ||
int64_t | idp, | ||
int | local_V_size, | ||
int64_t * | id0gap, | ||
int * | lgap, | ||
int | ngap, | ||
Flag | flag_stgy | ||
) |
Performs the multiplication of a symmetric, Toeplitz block-diagonal matrix with gaps, T, by an arbitrary matrix, V, distributed over processes.
We first rebuild the Toeplitz block matrix structure to reduce the computation cost and skip the computations of the values on the defined gaps.
The parameters are :
V | [input] distributed data matrix (with the convention V(i,j)=V[i+j*n]) ; [out] result of the product TV |
nrow | number of rows of the global data matrix V |
m | number of columns for the data matrix V in the global rowwise order |
m_rowwise | number of columns for the data matrix V in the rowwise order per processor |
tpltzblocks | list of the toeplitz blocks struture with its own parameters (idv, n, T_block, lambda) :
|
nb_blocks_all | number of all Toeplitz block on the diagonal of the full Toeplitz matrix |
nb_blocks_local | number of Toeplitz blocks as stored in T |
idp | global index of the first element of the local part of V |
local_V_size | a number of all elements in local V |
id0gap | index of the first element of each defined gap |
lgap | length of each defined gaps |
ngap | number of defined gaps |
flag_stgy | flag strategy for the product computation |
Definition at line 170 of file toeplitz_seq.c.