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

STEllAR-GROUP / hpx / #851

16 Dec 2022 12:27PM CUT 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

0.0
/components/process/src/util/posix/create_pipe_u.cpp
1
// Copyright (c) 2006, 2007 Julio M. Merino Vidal
2
// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling
3
// Copyright (c) 2009 Boris Schaeling
4
// Copyright (c) 2010 Felipe Tanus, Boris Schaeling
5
// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling
6
// Copyright (c) 2016 Hartmut Kaiser
7
//
8
//  SPDX-License-Identifier: BSL-1.0
9
// Distributed under the Boost Software License, Version 1.0. (See accompanying
10
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
11

12
#include <hpx/config.hpp>
13

14
#if !defined(HPX_WINDOWS)
15
#include <hpx/modules/errors.hpp>
16

17
#include <hpx/components/process/util/posix/create_pipe.hpp>
18

19
#include <unistd.h>
20

21
namespace hpx { namespace components { namespace process { namespace posix
22
{
23
    pipe create_pipe()
×
24
    {
25
        int fds[2];
26
        if (::pipe(fds) == -1)
×
27
        {
28
            HPX_THROW_EXCEPTION(invalid_status,
×
29
                "posix::create_pipe", "pipe(2) failed");
30
        }
31
        return pipe(fds[0], fds[1]);
×
32
    }
×
33

34
    pipe create_pipe(hpx::error_code &ec)
×
35
    {
36
        int fds[2] = { 0, 0 };
×
37
        if (::pipe(fds) == -1)
×
38
        {
39
            HPX_THROWS_IF(ec, invalid_status,
×
40
                "posix::create_pipe", "pipe(2) failed");
41
        }
×
42
        else
43
        {
44
            ec = hpx::make_success_code();
×
45
        }
46
        return pipe(fds[0], fds[1]);
×
47
    }
×
48
}}}}
49

50
#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