LCOV - code coverage report
Current view: top level - synthesis/Parallel - MPITransport.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 1 0.0 %
Date: 2024-10-04 16:51:10 Functions: 0 1 0.0 %

          Line data    Source code
       1             : //# MPITransport.h: MPI based parallel data transport model
       2             : //# Copyright (C) 1998,1999,2000
       3             : //# Associated Universities, Inc. Washington DC, USA.
       4             : //#
       5             : //# This library is free software; you can redistribute it and/or modify it
       6             : //# under the terms of the GNU Library General Public License as published by
       7             : //# the Free Software Foundation; either version 2 of the License, or (at your
       8             : //# option) any later version.
       9             : //#
      10             : //# This library is distributed in the hope that it will be useful, but WITHOUT
      11             : //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      12             : //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
      13             : //# License for more details.
      14             : //#
      15             : //# You should have received a copy of the GNU Library General Public License
      16             : //# along with this library; if not, write to the Free Software Foundation,
      17             : //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
      18             : //#
      19             : //# Correspondence concerning AIPS++ should be addressed as follows:
      20             : //#        Internet email: casa-feedback@nrao.edu.
      21             : //#        Postal address: AIPS++ Project Office
      22             : //#                        National Radio Astronomy Observatory
      23             : //#                        520 Edgemont Road
      24             : //#                        Charlottesville, VA 22903-2475 USA
      25             : //#
      26             : //#
      27             : //# $Id$
      28             : 
      29             : #ifndef SYNTHESIS_MPITRANSPORT_H
      30             : #define SYNTHESIS_MPITRANSPORT_H
      31             : 
      32             : #include <synthesis/Parallel/PTransport.h>
      33             : 
      34             : namespace casa { //# NAMESPACE CASA - BEGIN
      35             : 
      36             : // <summary>
      37             : // MPI data transport models
      38             : // </summary>
      39             : 
      40             : // <use visibility=local>
      41             : 
      42             : // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
      43             : // </reviewed>
      44             : 
      45             : // <prerequisite>
      46             : //   <li> SomeClass
      47             : //   <li> SomeOtherClass
      48             : //   <li> some concept
      49             : // </prerequisite>
      50             : //
      51             : // <etymology>
      52             : // </etymology>
      53             : //
      54             : // <synopsis>
      55             : // </synopsis>
      56             : //
      57             : // <example>
      58             : // </example>
      59             : //
      60             : // <motivation>
      61             : // </motivation>
      62             : //
      63             : //
      64             : //# <todo asof="yyyy/mm/dd">
      65             : //#   <li> add this feature
      66             : //#   <li> fix this bug
      67             : //#   <li> start discussion of this possible extension
      68             : //# </todo>
      69             : 
      70             : // Putting in the MPI Transport stuff only makes sense if we have MPI
      71             : #ifdef HAVE_MPI
      72             : class MPITransport : public PTransport {
      73             :  public:
      74             :   // Default constructor and destructor
      75             :   MPITransport();
      76             :   virtual ~MPITransport();
      77             : 
      78             :   // Construct from argv
      79             :   MPITransport(casacore::Int, casacore::Char *argv[]);
      80             : 
      81             :   // Default source and message tag values
      82             :   virtual casacore::Int anyTag();
      83             :   virtual casacore::Int anySource();
      84             :   
      85             :   // Define the rank of the controller process
      86           0 :   virtual casacore::Int controllerRank() {return 0;};
      87             :   
      88             :   // Get and put functions on the parallel data transport layer
      89             :   virtual casacore::Int put(const casacore::Array<casacore::Float> &);
      90             :   virtual casacore::Int put(const casacore::Array<casacore::Double> &);
      91             :   virtual casacore::Int put(const casacore::Array<casacore::Complex> &);
      92             :   virtual casacore::Int put(const casacore::Array<casacore::DComplex> &);
      93             :   virtual casacore::Int put(const casacore::Array<casacore::Int> &);
      94             :   virtual casacore::Int put(const casacore::Float &);
      95             :   virtual casacore::Int put(const casacore::Double &);
      96             :   virtual casacore::Int put(const casacore::Complex &);
      97             :   virtual casacore::Int put(const casacore::DComplex &);
      98             :   virtual casacore::Int put(const casacore::Int &);
      99             :   virtual casacore::Int put(const casacore::String &);
     100             :   virtual casacore::Int put(const casacore::Bool &);
     101             :   virtual casacore::Int put(const casacore::Record &);
     102             : 
     103             :   virtual casacore::Int get(casacore::Array<casacore::Float> &);
     104             :   virtual casacore::Int get(casacore::Array<casacore::Double> &);
     105             :   virtual casacore::Int get(casacore::Array<casacore::Complex> &);
     106             :   virtual casacore::Int get(casacore::Array<casacore::DComplex> &);
     107             :   virtual casacore::Int get(casacore::Array<casacore::Int> &);
     108             :   virtual casacore::Int get(casacore::Float &);
     109             :   virtual casacore::Int get(casacore::Double &);
     110             :   virtual casacore::Int get(casacore::Complex &);
     111             :   virtual casacore::Int get(casacore::DComplex &);
     112             :   virtual casacore::Int get(casacore::Int &);
     113             :   virtual casacore::Int get(casacore::String &);
     114             :   virtual casacore::Int get(casacore::Bool &);
     115             :   virtual casacore::Int get(casacore::Record &);
     116             : 
     117             :   virtual casacore::Bool isFinalized();
     118             :  private:
     119             :   // Local work variables
     120             :   casacore::Int sendTo, myOp, getFrom;
     121             : 
     122             :   // Utility functions to set default source/destination and tag values
     123             :   void setSourceAndTag (casacore::Int &source, casacore::Int &tag);
     124             :   void setDestAndTag (casacore::Int &dest, casacore::Int &tag);
     125             : };
     126             : #endif
     127             : 
     128             : } //# NAMESPACE CASA - END
     129             : 
     130             : #endif

Generated by: LCOV version 1.16