• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

STEllAR-GROUP / hpx / #856

28 Dec 2022 02:00AM UTC coverage: 86.602% (+0.05%) from 86.55%
#856

push

StellarBot
Merge #6119

6119: Update CMakeLists.txt r=hkaiser a=khuck

updating the default APEX version


Co-authored-by: Kevin Huck <khuck@cs.uoregon.edu>

174566 of 201573 relevant lines covered (86.6%)

1876093.78 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

84.62
/libs/core/runtime_configuration/src/runtime_mode.cpp
1
////////////////////////////////////////////////////////////////////////////////
2
//  Copyright (c) 2012 Bryce Adelstein-Lelbach
3
//  Copyright (c) 2012-2022 Hartmut Kaiser
4
//
5
//  SPDX-License-Identifier: BSL-1.0
6
//  Distributed under the Boost Software License, Version 1.0. (See accompanying
7
//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8
////////////////////////////////////////////////////////////////////////////////
9

10
#include <hpx/config.hpp>
11
#include <hpx/runtime_configuration/runtime_mode.hpp>
12

13
#include <cstddef>
14
#include <string>
15

16
namespace hpx {
17

18
    namespace strings {
19

20
        inline constexpr char const* const runtime_mode_names[] = {
21
            "invalid",    // -1
22
            "console",    // 0
23
            "worker",     // 1
24
            "connect",    // 2
25
            "local",      // 3
26
            "default",    // 4
27
        };
28
    }
29

30
    char const* get_runtime_mode_name(runtime_mode state) noexcept
1,188✔
31
    {
32
        if (state < runtime_mode::invalid || state >= runtime_mode::last)
1,188✔
33
            return "invalid (value out of bounds)";
×
34
        return strings::runtime_mode_names[static_cast<int>(state) + 1];
1,188✔
35
    }
1,188✔
36

37
    runtime_mode get_runtime_mode_from_name(std::string const& mode)
596✔
38
    {
39
        for (std::size_t i = 0;
1,335✔
40
             static_cast<runtime_mode>(i) < runtime_mode::last; ++i)
1,335✔
41
        {
42
            if (mode == strings::runtime_mode_names[i])
1,335✔
43
                return static_cast<runtime_mode>(i - 1);
596✔
44
        }
739✔
45
        return runtime_mode::invalid;
×
46
    }
596✔
47
}    // namespace hpx
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc