Quinoa all test code coverage report
Current view: top level - Main - LBSwitch.cpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 7 7 100.0 %
Date: 2024-04-29 14:42:33 Functions: 2 3 66.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 8 16 50.0 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/Main/LBSwitch.cpp
       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++ chare group for switching on/off load balancing
       9                 :            :   \details   Charm++ chare group for switching on/off load balancing.
      10                 :            : */
      11                 :            : // *****************************************************************************
      12                 :            : 
      13                 :            : #include <iostream>
      14                 :            : 
      15                 :            : #include "LBSwitch.hpp"
      16                 :            : #include "Print.hpp"
      17                 :            : 
      18                 :            : using tk::LBSwitch;
      19                 :            : 
      20                 :        582 : LBSwitch::LBSwitch()
      21                 :            : // *****************************************************************************
      22                 :            : //  Constructor: turn on automatic load balancing
      23                 :            : // *****************************************************************************
      24                 :            : {
      25         [ +  - ]:        582 :   TurnManualLBOff();
      26                 :        582 : }
      27                 :            : 
      28                 :            : void
      29                 :        587 : LBSwitch::off()
      30                 :            : // *****************************************************************************
      31                 :            : //  Turn off automatic load balancing
      32                 :            : //! \details Since this is a [procinit] routine, the runtime system executes the
      33                 :            : //!   routine exactly once on every PE early on in the Charm++ init
      34                 :            : //!   sequence. Must be static as it is called without an object. See also:
      35                 :            : //!   Section "Initializations at Program Startup" at in the Charm++ manual
      36                 :            : //!   http://charm.cs.illinois.edu/manuals/html/charm++/manual.html.
      37                 :            : // *****************************************************************************
      38                 :            : {
      39                 :        587 :   TurnManualLBOn();
      40                 :            : 
      41 [ +  + ][ +  - ]:        782 :   if (CkMyPe() == 0) Print( "", std::cout ).diag( "Load balancing off" );
         [ +  - ][ +  - ]
         [ +  - ][ -  + ]
                 [ -  - ]
      42                 :        587 : }
      43                 :            : 
      44                 :            : #include "NoWarning/lbswitch.def.h"

Generated by: LCOV version 1.14