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

STEllAR-GROUP / hpx / #862

10 Jan 2023 05:30PM UTC coverage: 86.582% (-0.05%) from 86.634%
#862

push

StellarBot
Merge #6130

6130: Remove the mutex lock in the critical path of get_partitioner. r=hkaiser a=JiakunYan

Remove the mutex lock in the critical path of hpx::resource::detail::get_partitioner.

The protected variable `partitioner_ref` is only set once during initialization.

Co-authored-by: Jiakun Yan <jiakunyan1998@gmail.com>

6 of 6 new or added lines in 1 file covered. (100.0%)

174767 of 201851 relevant lines covered (86.58%)

2069816.07 hits per line

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

93.33
/libs/core/serialization/include/hpx/serialization/valarray.hpp
1
//  Copyright (c) 2017 Christopher Taylor
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
#pragma once
8

9
#include <hpx/config.hpp>
10
#include <hpx/serialization/serialization_fwd.hpp>
11
#include <hpx/serialization/traits/is_bitwise_serializable.hpp>
12

13
#include <cstddef>
14
#include <cstdint>
15
#include <valarray>
16

17
namespace hpx::serialization {
18

19
    template <typename T>
20
    void serialize(input_archive& ar, std::valarray<T>& arr, int /* version */)
6✔
21
    {
22
        std::uint64_t sz = 0;
6✔
23
        ar >> sz;
6✔
24
        arr.resize(static_cast<std::size_t>(sz));
6✔
25

26
        if (sz == 0)
6✔
27
            return;
×
28

29
        for (std::size_t i = 0; i < sz; ++i)
486✔
30
            ar >> arr[i];
480✔
31
    }
6✔
32

33
    template <typename T>
34
    void serialize(
6✔
35
        output_archive& ar, std::valarray<T> const& arr, int /* version */)
36
    {
37
        auto const sz = static_cast<std::uint64_t>(arr.size());
6✔
38
        ar << sz;
6✔
39
        for (auto const& v : arr)
486✔
40
            ar << v;
480✔
41
    }
6✔
42
}    // namespace hpx::serialization
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