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

STEllAR-GROUP / hpx / #882

31 Aug 2023 07:44PM UTC coverage: 41.798% (-44.7%) from 86.546%
#882

push

19442 of 46514 relevant lines covered (41.8%)

126375.38 hits per line

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

0.0
/libs/core/async_base/src/launch_policy.cpp
1
//  Copyright (c) 2007-2022 Hartmut Kaiser
2
//
3
//  SPDX-License-Identifier: BSL-1.0
4
//  Distributed under the Boost Software License, Version 1.0. (See accompanying
5
//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6

7
#include <hpx/config.hpp>
8
#include <hpx/async_base/launch_policy.hpp>
9
#include <hpx/modules/coroutines.hpp>
10
#include <hpx/modules/serialization.hpp>
11

12
#include <cstdint>
13

14
namespace hpx {
15

16
    ///////////////////////////////////////////////////////////////////////////
17
    detail::async_policy const launch::async =
18
        detail::async_policy{threads::thread_priority::default_};
19
    detail::fork_policy const launch::fork =
20
        detail::fork_policy{threads::thread_priority::default_};
21
    detail::sync_policy const launch::sync = detail::sync_policy{};
22
    detail::deferred_policy const launch::deferred = detail::deferred_policy{};
23
    detail::apply_policy const launch::apply = detail::apply_policy{};
24

25
    detail::select_policy_generator const launch::select =
26
        detail::select_policy_generator{};
27

28
    detail::policy_holder<> const launch::all =
29
        detail::policy_holder<>{launch_policy::all};
30
    detail::policy_holder<> const launch::sync_policies =
31
        detail::policy_holder<>{launch_policy::sync_policies};
32
    detail::policy_holder<> const launch::async_policies =
33
        detail::policy_holder<>{launch_policy::async_policies};
34

35
    ///////////////////////////////////////////////////////////////////////////
36
    namespace detail {
37

38
        void policy_holder_base::load(
39
            serialization::input_archive& ar, unsigned)
40
        {
×
41
            ar >> policy_;
42
            ar >> priority_;
43
            ar >> hint_.hint >> hint_.mode;
×
44
            std::uint8_t mode = 0;
×
45
            ar >> mode;
×
46
            hint_.placement_mode(
×
47
                static_cast<hpx::threads::thread_placement_hint>(mode));
48
            ar >> mode;
×
49
            hint_.sharing_mode(
50
                static_cast<hpx::threads::thread_sharing_hint>(mode));
51
        }
×
52

53
        void policy_holder_base::save(
×
54
            serialization::output_archive& ar, unsigned) const
55
        {
×
56
            ar << policy_;
57
            ar << priority_;
58
            ar << hint_.hint << hint_.mode
×
59
               << static_cast<std::uint8_t>(hint_.placement_mode())
×
60
               << static_cast<std::uint8_t>(hint_.sharing_mode());
×
61
        }
62
    }    // namespace detail
63
}    // 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

© 2026 Coveralls, Inc