MIDAPACK - MIcrowave Data Analysis PACKage  1.1b
Parallel software tools for high performance CMB DA analysis
toeplitz_gappy.c File Reference

Go to the source code of this file.

Functions

int mpi_gstbmm (double **V, int nrow, int m, int m_rowwise, Block *tpltzblocks, int nb_blocks_local, int nb_blocks_all, int id0p, int local_V_size, int64_t *id0gap, int *lgap, int ngap, Flag flag_stgy, MPI_Comm comm)
 
int reset_gaps (double **V, int id0, int local_V_size, int m, int nrow, int m_rowwise, const int64_t *id0gap, const int *lgap, int ngap)
 Set the data to zeros at the gaps location. More...
 
int build_gappy_blocks (int nrow, int m, Block *tpltzblocks, int nb_blocks_local, int nb_blocks_all, const int64_t *id0gap, const int *lgap, int ngap, Block *tpltzblocks_gappy, int *nb_blocks_gappy_final, int flag_param_distmin_fixed)
 

Function Documentation

◆ mpi_gstbmm()

int mpi_gstbmm ( double **  V,
int  nrow,
int  m,
int  m_rowwise,
Block *  tpltzblocks,
int  nb_blocks_local,
int  nb_blocks_all,
int  id0p,
int  local_V_size,
int64_t *  id0gap,
int *  lgap,
int  ngap,
Flag  flag_stgy,
MPI_Comm  comm 
)

Performs the multiplication of a symmetric, Toeplitz block-diagonal matrix, T, by an arbitrary matrix, V, distributed over processes in the generalized column-wise way. This matrix V contains defined gaps which represents the useless data for the comutation. The gaps indexes are defined in the global time space as the generized toeplitz matrix, meaning the row dimension. Each of his diagonal blocks is a symmetric, band-diagonal Toeplitz matrix, which can be different for each block.

We first rebuild the Toeplitz block matrix structure to reduce the computation cost and skip the computations of the values on the defined gaps. then, each process performs the multiplication sequentially for each of the gappy block and based on the sliding window algorithm. Prior to that MPI calls are used to exchange data between neighboring process. The parameters are :

Parameters
V[input] distributed data matrix (with the convention V(i,j)=V[i+j*n]) ; [out] result of the product TV
nrownumber of rows of the global data matrix V
mnumber of columns for the data matrix V in the global rowwise order
m_rowwisenumber of columns for the data matrix V in the rowwise order per processor
tpltzblockslist of the toeplitz blocks struture with its own parameters (idv, n, T_block, lambda) :
  • idv is the global row index defining for each Toeplitz block as stored in the vector T ;
  • n size of each Toeplitz block
  • T_block location of each Toeplitz matrix data composed of the non-zero entries of the first row ;
  • lambda size of each Toeplitz block data T_block. The bandwith size is then equal to lambda*2-1
nb_blocks_allnumber of all Toeplitz block on the diagonal of the full Toeplitz matrix
nb_blocks_localnumber of Toeplitz blocks as stored in T
idpglobal index of the first element of the local part of V
local_V_sizea number of all elements in local V
id0gapindex of the first element of each defined gap
lgaplength of each defined gaps
ngapnumber of defined gaps
flag_stgyflag strategy for the product computation
commMPI communicator

Definition at line 119 of file toeplitz_gappy.c.

◆ reset_gaps()

int reset_gaps ( double **  V,
int  id0,
int  local_V_size,
int  m,
int  nrow,
int  m_rowwise,
const int64_t *  id0gap,
const 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 227 of file toeplitz_gappy.c.

◆ build_gappy_blocks()

int build_gappy_blocks ( int  nrow,
int  m,
Block *  tpltzblocks,
int  nb_blocks_local,
int  nb_blocks_all,
const int64_t *  id0gap,
const int *  lgap,
int  ngap,
Block *  tpltzblocks_gappy,
int *  nb_blocks_gappy_final,
int  flag_param_distmin_fixed 
)

Build the gappy Toeplitz block structure to optimise the product computation at gaps location.

Considering the significant gaps, the blocks to which they belong are cut and split between the gap's edges to reduce the total row size of the flotting blocks. It take into consideration the minimum correlation length and a parameter that allows us to control the minimum gap size allowed to split the blocks. In some cases, the gap can be partially reduce to fit the minimum block size needed for computation or just for performance criteria. This is based on the fact that the gaps are previously set to zeros before calling this routine.

Parameters
nrownumber of rows of the global data matrix V
mnumber of columns for the data matrix V in the global rowwise order
tpltzblockslist of the toeplitz blocks struture with its own parameters (idv, n, T_block, lambda).
nb_blocks_localnumber of Toeplitz blocks as stored in T
nb_blocks_allnumber of all Toeplitz block on the diagonal of the full Toeplitz matrix
id0gapindex of the first element of each defined gap
lgaplength of each defined gaps
ngapnumber of defined gaps
tpltzblocks_gappylist of the gappy toeplitz blocks struture with its own parameters
nb_blocks_gappy_finalreal number of obtained gappy Toeplitz blocks
flag_param_distmin_fixedflag to defined the minimum gap value allowed to split a Toeplitz block

Definition at line 274 of file toeplitz_gappy.c.