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

STEllAR-GROUP / hpx / #863

11 Jan 2023 05:02PM UTC coverage: 86.533% (-0.05%) from 86.582%
#863

push

StellarBot
Merge #6126

6126: Deprecate hpx::parallel::task_block in favor of hpx::experimental::ta… r=hkaiser a=dimitraka



Co-authored-by: kadimitra <kadimitra@ece.auth.gr>

174614 of 201789 relevant lines covered (86.53%)

1954694.49 hits per line

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

68.18
/libs/core/execution/src/execution_parameter_callbacks.cpp
1
//  Copyright (c) 2020 ETH Zurich
2
//  Copyright (c) 2017 Hartmut Kaiser
3
//  Copyright (c) 2017 Google
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
#include <hpx/config.hpp>
10
#include <hpx/execution/detail/execution_parameter_callbacks.hpp>
11

12
#include <cstddef>
13
#include <type_traits>
14
#include <utility>
15

16
///////////////////////////////////////////////////////////////////////////////
17
namespace hpx::parallel::execution::detail {
18

19
    get_os_thread_count_type& get_get_os_thread_count()
3,545✔
20
    {
21
        static get_os_thread_count_type f;
3,545✔
22
        return f;
3,545✔
23
    }
24

25
    void set_get_os_thread_count(get_os_thread_count_type f)
1,223✔
26
    {
27
        get_get_os_thread_count() = HPX_MOVE(f);
1,223✔
28
    }
1,223✔
29

30
    std::size_t get_os_thread_count()
1,161✔
31
    {
32
        if (get_get_os_thread_count())
1,161✔
33
        {
34
            return get_get_os_thread_count()();
1,161✔
35
        }
36
        else
37
        {
38
            HPX_THROW_EXCEPTION(hpx::error::invalid_status,
×
39
                "hpx::parallel::execution::detail::get_os_thread_count",
40
                "No fallback handler for get_os_thread_count is installed. "
41
                "Please start the runtime if you haven't done so. If you "
42
                "intended to not use the runtime make sure you have "
43
                "implemented get_os_thread_count for your executor or install "
44
                "a fallback handler with "
45
                "hpx::parallel::execution::detail::set_get_os_thread_count.");
46
            return std::size_t(-1);
47
        }
48
    }
×
49

50
    get_pu_mask_type& get_get_pu_mask()
1,223✔
51
    {
52
        static get_pu_mask_type f;
1,223✔
53
        return f;
1,223✔
54
    }
55

56
    void set_get_pu_mask(get_pu_mask_type f)
1,223✔
57
    {
58
        get_get_pu_mask() = HPX_MOVE(f);
1,223✔
59
    }
1,223✔
60

61
    threads::mask_type get_pu_mask(
×
62
        threads::topology& topo, std::size_t thread_num)
63
    {
64
        if (get_get_pu_mask())
×
65
        {
66
            return get_get_pu_mask()(topo, thread_num);
×
67
        }
68
        else
69
        {
70
            HPX_THROW_EXCEPTION(hpx::error::invalid_status,
×
71
                "hpx::parallel::execution::detail::get_pu_mask",
72
                "No fallback handler for get_pu_mask is installed. Please "
73
                "start the runtime if you haven't done so. If you intended "
74
                "to not use the runtime make sure you have implemented "
75
                "get_pu_mask for your executor or install a fallback "
76
                "handler with "
77
                "hpx::parallel::execution::detail::set_get_pu_mask.");
78

79
            static threads::mask_type mask{};
80
            return mask;
81
        }
82
    }
×
83
}    // namespace hpx::parallel::execution::detail
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