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

Contains sequential/openMP routines for Toeplitz algebra. More...

Go to the source code of this file.

Functions

int stmm (double **V, int n, int m, double *T, int lambda, Flag flag_stgy)
 
int stbmm (double **V, int nrow, int m_cw, int m_rw, Block *tpltzblocks, int nb_blocks, int64_t idp, int local_V_size, Flag flag_stgy)
 
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)
 
int gstbmm0 (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)
 

Detailed Description

Contains sequential/openMP routines for Toeplitz algebra.

version 1.1b, July 2012

Author
Frederic Dauvergne

Project: Midapack library, ANR MIDAS'09 - Toeplitz Algebra module Purpose: Provide Toeplitz algebra tools suitable for Cosmic Microwave Background (CMB) data analysis.

Note
Copyright (c) 2010-2012 APC CNRS Université Paris Diderot
This program is free software; you can redistribute it and/or modify it under the terms
of the GNU Lesser General Public License as published by the Free Software Foundation;
either version 3 of the License, or (at your option) any later version. This program is
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this
program; if not, see http://www.gnu.org/licenses/lgpl.html
For more information about ANR MIDAS'09 project see :
http://www.apc.univ-paris7.fr/APC_CS/Recherche/Adamis/MIDAS09/index.html
ACKNOWLEDGMENT: This work has been supported in part by the French National Research
Agency (ANR) through COSINUS program (project MIDAS no. ANR-09-COSI-009).

Log: toeplitz*.c

Revision 1.0b 2012/05/07 Frederic Dauvergne (APC) Official release 1.0beta. The first installement of the library is the Toeplitz algebra module.

Revision 1.1b 2012/07/- Frederic Dauvergne (APC)

  • mpi_stbmm allows now rowi-wise order per process datas and no-blocking communications.
  • OMP improvment for optimal cpu time.
  • bug fixed for OMP in the stmm_basic routine.
  • distcorrmin is used to communicate only lambda-1 datas when it is needed.
  • new reshaping routines using transformation functions in stmm. Thus, only one copy at most is needed.
  • tpltz_init improvement using define_nfft and define_blocksize routines.
  • add Block struture to define each Toeplitz block.
  • add Flag structure and preprocessing parameters to define the computational strategy. All the flag parameters are then available directly from the API.

Definition in file toeplitz_seq.c.

Function Documentation

◆ stmm()

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.

Parameters
V[input] data matrix (with the convention V(i,j)=V[i+j*n]) ; [out] result of the product TV
nnumber of rows of V
mnumber of columns of V
mnumber of columns of V
TToeplitz matrix data composed of the non-zero entries of his first row
lambdanumber of non-zero in the first row of the Toeplitz and size of T
flag_stgyflag strategy for the product computation

Definition at line 85 of file toeplitz_seq.c.

◆ stbmm()

int stbmm ( double **  V,
int  nrow,
int  m_cw,
int  m_rw,
Block *  tpltzblocks,
int  nb_blocks,
int64_t  idp,
int  local_V_size,
Flag  flag_stgy 
)

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.

Each process performs the multiplication sequentially for each diagonal block and based on the sliding window algorithm. Prior to that MPI calls are used to exchange data between neighboring process. Each of the diagonal blocks is a symmetric, band-diagonal Toeplitz matrix, which can be different for each block. 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) :
nb_blocksnumber 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
flag_stgyflag strategy for the product computation

Definition at line 136 of file toeplitz_seq.c.

◆ gstbmm()

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 :

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

Definition at line 189 of file toeplitz_seq.c.

◆ gstbmm0()

int gstbmm0 ( 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 
)

Definition at line 206 of file toeplitz_seq.c.