• 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/compute_local/src/get_host_targets.cpp
1
//  Copyright (c) 2016-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/compute_local/host/target.hpp>
9
#include <hpx/modules/resource_partitioner.hpp>
10
#include <hpx/modules/runtime_local.hpp>
11

12
#include <cstddef>
13
#include <vector>
14

15
namespace hpx::compute::host {
16

17
    std::vector<target> get_local_targets()
18
    {
19
        std::size_t const num_os_threads = hpx::get_os_thread_count();
×
20

21
        std::vector<target> targets;
×
22
        targets.reserve(num_os_threads);
23

×
24
        auto const& rp = hpx::resource::get_partitioner();
×
25
        for (std::size_t num_thread = 0; num_thread != num_os_threads;
26
            ++num_thread)
×
27
        {
×
28
            targets.emplace_back(rp.get_pu_mask(num_thread));
29
        }
30

×
31
        return targets;
32
    }
33
}    // namespace hpx::compute::host
×
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