Xmipp  v3.23.11-Nereus
mpi_angular_projection_matching.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Authors: Roberto Marabini (roberto@cnb.csic.es)
3  * J.M de la Rosa (jmdelarosa@cnb.csic.es)
4  *
5  * Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20  * 02111-1307 USA
21  *
22  * All comments concerning this program package may be sent to the
23  * e-mail address 'xmipp@cnb.csic.es'
24  ***************************************************************************/
25 
26 #ifndef MPI_ANGULAR_PROJECTION_MATCHING_H_
27 #define MPI_ANGULAR_PROJECTION_MATCHING_H_
28 
29 #include "parallel/xmipp_mpi.h"
31 
37 {
38 private:
39  MpiNode *node;
40 
42  int mpi_job_size;
44  size_t * imagesBuffer;
46  int chunk_index, chunk_number; //will keep the next chunk to assign and the total number of chunks
47  int *last_chunk; //store the last chunk assigned to each node
48 
49 
52  double chunk_angular_distance;
53 
55  FileName fn_sym;
56 
58  Sampling chunk_mysampling;
59 
63  int symmetry;
64 
66  int sym_order;
67 
68 public:
70  void read(int argc, char** argv);
75 
77  void processAllImages();
78  void writeOutputFiles();
83  bool distributeJobs(size_t * imagesToSent, int node);
87  bool requestJobs(std::vector<size_t> &imagesToProcess);
88 
89  /* Define accepted params ------------------------------------------------------------------- */
90  void defineParams();
91  /* Read parameters --------------------------------------------------------- */
92  void readParams();
93 
95  void produceSideInfo();
97  void computeChunks();
98  void computeChunkAngularDistance(int symmetry, int sym_order);
99 }
100 ;//end of class MpiProgML2D
102 #endif /* MPI_ANGULAR_PROJECTION_MATCHING_H_ */
void computeChunkAngularDistance(int symmetry, int sym_order)
bool requestJobs(std::vector< size_t > &imagesToProcess)
void readParams()
Read arguments from command line.
void defineParams()
Define arguments accepted.
int argc
Original command line arguments.
Definition: xmipp_program.h:86
const char ** argv
Definition: xmipp_program.h:87
bool distributeJobs(size_t *imagesToSent, int node)