MIDAPACK - MIcrowave Data Analysis PACKage  1.1b
Parallel software tools for high performance CMB DA analysis
 All Data Structures Files Functions Variables Typedefs Groups Pages
toeplitz.c File Reference

Contains the main part of the sequential routines for Toeplitz algebra. More...

Go to the source code of this file.

Functions

int print_error_message (int error_number, char const *file, int line)
 Prints error message corresponding to an error number.
int define_blocksize (int n, int lambda, int bs_flag, int fixed_bs)
 Defines an optimal size of the block used in the sliding windows algorithm.
int define_nfft (int n_thread, int flag_nfft, int fixed_nfft)
 Defines the number of simultaneous ffts for the Toeplitz matrix product computation.
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 fftw_init_omp_threads (int fftw_n_thread)
 Initialize omp threads for fftw plans.
int rhs_init_fftw (int *nfft, int fft_size, fftw_complex **V_fft, double **V_rfft, fftw_plan *plan_f, fftw_plan *plan_b, int fftw_flag)
 Initializes fftw array and plan for the right hand side, general matrix V.
int circ_init_fftw (double *T, int fft_size, int lambda, fftw_complex **T_fft)
 Initializes fftw array and plan for the circulant matrix T_circ obtained from T.
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 copy_block (int ninrow, int nincol, double *Vin, int noutrow, int noutcol, double *Vout, int inrow, int incol, int nblockrow, int nblockcol, int outrow, int outcol, double norm, int set_zero_flag)
 Copies (and potentially reshapes) a selected block of the input matrix to a specified position of the output matrix.
int scmm_direct (int fft_size, int nfft, fftw_complex *C_fft, int ncol, double *V_rfft, double **CV, fftw_complex *V_fft, fftw_plan plan_f_V, fftw_plan plan_b_CV)
 Performs the product of a circulant matrix C_fft by a matrix V_rfft using fftw plans.
int scmm_basic (double **V, int blocksize, int m, fftw_complex *C_fft, double **CV, fftw_complex *V_fft, double *V_rfft, int nfft, fftw_plan plan_f_V, fftw_plan plan_b_CV)
 Performs the product of a circulant matrix by a matrix using FFT's (an INTERNAL routine)
int stmm_core (double **V, int n, int m, double *T, fftw_complex *T_fft, int blocksize, int lambda, fftw_complex *V_fft, double *V_rfft, int nfft, fftw_plan plan_f, fftw_plan plan_b, int flag_offset, int flag_nofft)
 Performs the stand alone product of a Toeplitz matrix by a matrix using the sliding window algorithm. (an INTERNAL routine)
int stmm_main (double **V, int n, int m, int id0, int l, double *T, fftw_complex *T_fft, int lambda, fftw_complex *V_fft, double *V_rfft, fftw_plan plan_f, fftw_plan plan_b, int blocksize, int nfft, Flag flag_stgy)
 Performs the product of a Toeplitz matrix by a general matrix using the sliding window algorithm with optimize reshaping. (an INTERNAL routine)
int mpi_stmm (double **V, int n, int m, int id0, int l, double *T, int lambda, Flag flag_stgy, MPI_Comm comm)
 Performs the product of a Toeplitz matrix by a general matrix using MPI. We assume that the matrix has already been scattered. (a USER routine)

Variables

int VERBOSE
 Verbose mode.
int VERBOSE_FIRSTINIT = 1
int PRINT_RANK = -1

Detailed Description

Contains the main part of the sequential routines for Toeplitz algebra.

version 1.2b, November 2012

Author:
Frederic Dauvergne, Maude Le Jeune, Antoine Rogier, Radek Stompor

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.

Revision 1.2b 2012/11/30 Frederic Dauvergne (APC)

  • extend the mpi product routine to rowwise order data distribution. This is now allowing tree kinds of distribution.
  • add int64 for some variables to extend the global volume of data you can use.
  • Openmp improvments.
  • Add toeplitz_wizard.c, which contains a set of easy to use routines with defined structures.

Definition in file toeplitz.c.


Variable Documentation

int VERBOSE

Verbose mode.

Prints some informative messages during the computation.

Definition at line 78 of file toeplitz.c.

int VERBOSE_FIRSTINIT = 1

Definition at line 79 of file toeplitz.c.

int PRINT_RANK = -1

Definition at line 82 of file toeplitz.c.