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

STEllAR-GROUP / hpx / #851

16 Dec 2022 12:27PM UTC coverage: 86.568% (+0.2%) from 86.404%
#851

push

StellarBot
Merge #6104

6104: Adding parameters API: measure_iteration r=hkaiser a=hkaiser

- split `get_chunk_size` CP into `measure_iteration` and modified `get_chunk_size`
- introducing a breaking change to `get_chunk_size` and `processing_units_count` customization point, those now expect the time for one iteration

The new APIs are:
```
    template <typename Target, typename F>
    hpx::chrono::steady_duration measure_iteration(
        Target&&, F&&, std::size_t num_tasks);

    template <typename Target>
    std::size_t processing_units_count(
        Target&&, hpx::chrono::steady_duration const&, std::size_t num_tasks);

    template <typename Target>
    std::size_t get_chunk_size(Target&&,
        hpx::chrono::steady_duration const&, std::size_t num_cores,
        std::size_t num_tasks);
```
This also moves all executor parameter objects to `namespace hpx::execution::experimental`. 

Co-authored-by: Hartmut Kaiser <hartmut.kaiser@gmail.com>

209 of 209 new or added lines in 34 files covered. (100.0%)

174475 of 201546 relevant lines covered (86.57%)

1888115.1 hits per line

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

57.14
/libs/full/parcelset_base/src/locality_interface.cpp
1
//  Copyright (c) 2021 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

9
#if defined(HPX_HAVE_NETWORKING)
10
#include <hpx/modules/errors.hpp>
11

12
#include <hpx/parcelset_base/detail/locality_interface_functions.hpp>
13
#include <hpx/parcelset_base/detail/parcel_route_handler.hpp>
14
#include <hpx/parcelset_base/locality.hpp>
15
#include <hpx/parcelset_base/locality_interface.hpp>
16
#include <hpx/parcelset_base/parcel_interface.hpp>
17
#include <hpx/parcelset_base/policies/message_handler.hpp>
18

19
#include <cstddef>
20
#include <string>
21
#include <system_error>
22
#include <utility>
23

24
///////////////////////////////////////////////////////////////////////////////
25
namespace hpx::parcelset {
26

27
    parcelset::parcel create_parcel()
475,833✔
28
    {
29
        return detail::create_parcel();
475,835✔
30
    }
31

32
    locality create_locality(std::string const& name)
711✔
33
    {
34
        return detail::create_locality(name);
711✔
35
    }
36

37
    namespace detail {
38

39
        void parcel_route_handler(
×
40
            std::error_code const& ec, parcelset::parcel const& p)
41
        {
42
            parcel_route_handler_func(ec, p);
×
43
        }
×
44
    }    // namespace detail
45
}    // namespace hpx::parcelset
46

47
#endif
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