LCOV - code coverage report
Current view: top level - synthesis/ImagerObjects - IterationControl.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 27 0.0 %
Date: 2024-12-11 20:54:31 Functions: 0 10 0.0 %

          Line data    Source code
       1             : /* -*- mode: c++ -*- */
       2             : //# IterationControl.h: Iteration control for parallel imaging framework
       3             : //#                     (ParallelImagerMixin)
       4             : //# Copyright (C) 2016
       5             : //# Associated Universities, Inc. Washington DC, USA.
       6             : //#
       7             : //# This library is free software; you can redistribute it and/or modify it
       8             : //# under the terms of the GNU Library General Public License as published by
       9             : //# the Free Software Foundation; either version 2 of the License, or (at your
      10             : //# option) any later version.
      11             : //#
      12             : //# This library is distributed in the hope that it will be useful, but WITHOUT
      13             : //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      14             : //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
      15             : //# License for more details.
      16             : //#
      17             : //# You should have received a copy of the GNU Library General Public License
      18             : //# along with this library; if not, write to the Free Software Foundation,
      19             : //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
      20             : //#
      21             : //# Correspondence concerning AIPS++ should be addressed as follows:
      22             : //#        Internet email: casa-feedback@nrao.edu.
      23             : //#        Postal address: AIPS++ Project Office
      24             : //#                        National Radio Astronomy Observatory
      25             : //#                        520 Edgemont Road
      26             : //#                        Charlottesville, VA 22903-2475 USA
      27             : //#
      28             : #ifndef ITERATION_CONTROL_H_
      29             : #define ITERATION_CONTROL_H_
      30             : 
      31             : #include <casacore/casa/Containers/Record.h>
      32             : #include <synthesis/ImagerObjects/MPIGlue.h>
      33             : #include <synthesis/ImagerObjects/ParallelImager.h>
      34             : 
      35             : #include <memory>
      36             : 
      37             : namespace casa {
      38             : 
      39             : class IterationControl {
      40             : 
      41             : protected:
      42             :         void
      43           0 :         setup_iteration_controller(MPI_Comm comm, casacore::Record &iter_pars) {
      44           0 :                 teardown_iteration_controller();
      45             :                 // Instantiate an iterbot. Use DistributedSynthesisIterBot when
      46             :                 // interaction with new GUI works; for now,
      47             :                 // DistributedSynthesisIterBotWithOldGUI works.
      48           0 :         };
      49             : 
      50             :         void
      51           0 :         teardown_iteration_controller() {
      52           0 :         }
      53             : 
      54             : public:
      55             :         void
      56           0 :         end_major_cycle() {
      57           0 :         };
      58             : 
      59             :         casacore::Record
      60           0 :         get_minor_cycle_controls() {
      61           0 :             return casacore::Record( );
      62             :         };
      63             : 
      64             :         void
      65           0 :         merge_execution_records(const casacore::Vector<casacore::Record> &recs) {
      66           0 :         };
      67             : 
      68             :         void
      69           0 :         merge_initialization_records(const casacore::Vector<casacore::Record> &recs) {
      70           0 :         };
      71             : 
      72             :         bool
      73           0 :         is_clean_complete() {
      74           0 :             return false;
      75             :         };
      76             : 
      77             :         casacore::Record
      78           0 :         get_summary() {
      79           0 :             return casacore::Record( );
      80             :         };
      81             : 
      82           0 :         static int effective_rank(MPI_Comm comm) {
      83             :                 int result;
      84           0 :                 if (comm != MPI_COMM_NULL)
      85           0 :                         MPI_Comm_rank(comm, &result);
      86             :                 else
      87           0 :                         result = -1;
      88           0 :                 return result;
      89             :         }
      90             : 
      91           0 :         static int effective_size(MPI_Comm comm) {
      92             :                 int result;
      93           0 :                 if (comm != MPI_COMM_NULL)
      94           0 :                         MPI_Comm_size(comm, &result);
      95             :                 else
      96           0 :                         result = 0;
      97           0 :                 return result;
      98             :         }
      99             : };
     100             : 
     101             : } // namespace casa
     102             : 
     103             : #endif // ITERATION_CONTROL_H_

Generated by: LCOV version 1.16