Quinoa all test code coverage report
Current view: top level - LinearSolver - conjugategradients.ci (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 4 4 100.0 %
Date: 2024-05-15 17:17:09 Functions: 0 0 -
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 2 4 50.0 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/LinearSolver/conjugategradients.ci
       4                 :            :   \copyright 2012-2015 J. Bakosi,
       5                 :            :              2016-2018 Los Alamos National Security, LLC.,
       6                 :            :              2019-2021 Triad National Security, LLC.
       7                 :            :              All rights reserved. See the LICENSE file for details.
       8                 :            :   \brief     Charm++ module interface for distributed conjugate gradients
       9                 :            :   \details   Charm++ module interface file for asynchronous distributed
      10                 :            :     conjugate gradients linear solver.
      11                 :            :   \see       ConjugateGradients.[ch]pp for more info.
      12                 :            : */
      13                 :            : // *****************************************************************************
      14                 :            : 
      15                 :            : module conjugategradients {
      16                 :            : 
      17                 :            :   include "CSR.hpp";
      18                 :            :   include "CommMap.hpp";
      19                 :            : 
      20                 :            :   namespace tk {
      21                 :            : 
      22                 :            :     array [1D] ConjugateGradients {
      23                 :            :       entry ConjugateGradients(
      24                 :            :               const CSR& A,
      25                 :            :               const std::vector< tk::real >& x,
      26                 :            :               const std::vector< tk::real >& b,
      27                 :            :               const std::vector< std::size_t >& gid,
      28                 :            :               const std::unordered_map< std::size_t, std::size_t >& lid,
      29                 :            :               const NodeCommMap& nodecommmap );
      30                 :            :       entry ConjugateGradients(
      31                 :            :               std::tuple< tk::CSR,
      32                 :            :                           std::vector< tk::real >,
      33                 :            :                           std::vector< tk::real > >&& system,
      34                 :            :               const std::vector< std::size_t >& gid,
      35                 :            :               const std::unordered_map< std::size_t, std::size_t >& lid,
      36                 :            :               const NodeCommMap& nodecommmap );
      37                 :            :       entry void init( const std::vector< tk::real >& x,
      38                 :            :                        const std::vector< tk::real >& b,
      39                 :            :                        const std::unordered_map< std::size_t,
      40                 :            :                          std::vector< std::pair< bool, tk::real > > >& bc,
      41                 :            :                        std::size_t ignorebc,
      42                 :        807 :                        CkCallback cb );
      43                 :            :       entry void setup( CkCallback cb );
      44                 :            :       entry void solve( std::size_t maxit, tk::real stop_tol, CkCallback c );
      45                 :            :       entry [reductiontarget] void normb( tk::real n );
      46 [ +  - ][ -  + ]:        693 :       entry [reductiontarget] void rho( tk::real r );
      47                 :            :       entry [reductiontarget] void pq( tk::real n );
      48                 :            :       entry [reductiontarget] void normres( tk::real r );
      49                 :       4657 :       entry void comres( const std::vector< std::size_t >& gid,
      50                 :            :                          const std::vector< std::vector< tk::real > >& rc );
      51                 :            :       entry void combc( const std::unordered_map< std::size_t,
      52                 :       4657 :                           std::vector< std::pair< bool, tk::real > > >& bc );
      53                 :            :       entry void comq( const std::vector< std::size_t >& gid,
      54                 :            :                        const std::vector< std::vector< tk::real > >& qc );
      55                 :            :       entry void comx( const std::vector< std::size_t >& gid,
      56                 :            :                        const std::vector< std::vector< tk::real > >& xc );
      57                 :            : 
      58                 :            :       // SDAG code follows. See http://charm.cs.illinois.edu/manuals/html/
      59                 :            :       // charm++/manual.html, Sec. "Structured Control Flow: Structured Dagger".
      60                 :            : 
      61                 :            :       entry void wait4res() {
      62                 :            :         when ownres_complete(), comres_complete(), normb_complete()
      63                 :            :         serial "res" { initres(); }
      64                 :            :       }
      65                 :            : 
      66                 :            :       entry void wait4bc() {
      67                 :            :         when ownbc_complete( CkCallback cb ), combc_complete()
      68                 :            :           serial "bc" { apply( cb ); }
      69                 :            :       }
      70                 :            : 
      71                 :            :       entry void wait4q() {
      72                 :            :         when ownq_complete(), comq_complete() serial "q" { q(); }
      73                 :            :       }
      74                 :            : 
      75                 :            :       entry void wait4x() {
      76                 :            :         when ownx_complete(), comx_complete() serial "x" { x(); }
      77                 :            :       }
      78                 :            : 
      79                 :            :       entry void ownres_complete();
      80                 :            :       entry void comres_complete();
      81                 :            :       entry void normb_complete();
      82                 :            :       entry void ownbc_complete( CkCallback cb );
      83                 :            :       entry void combc_complete();
      84                 :            :       entry void ownq_complete();
      85                 :            :       entry void comq_complete();
      86                 :            :       entry void ownx_complete();
      87                 :            :       entry void comx_complete();
      88                 :            :     };
      89                 :            : 
      90                 :            :   } // tk::
      91                 :            : 
      92                 :            : }

Generated by: LCOV version 1.14