• 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/full/agas_base/src/gva.cpp
1
//  Copyright (c) 2020-2025 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/agas_base/gva.hpp>
9
#include <hpx/modules/errors.hpp>
10
#include <hpx/modules/serialization.hpp>
11
#include <hpx/modules/util.hpp>
12

13
#include <cstddef>
14
#include <ostream>
15

16
namespace hpx::agas {
17

18
    ///////////////////////////////////////////////////////////////////////////
19
    template <typename Archive>
20
    void gva::save(Archive& ar, unsigned int const /*version*/) const
21
    {
×
22
        std::size_t lva = reinterpret_cast<std::size_t>(lva_);
23
        ar << prefix << type << count << lva << offset;    //-V128
×
24
    }
×
25

×
26
    template <typename Archive>
27
    void gva::load(Archive& ar, unsigned int const version)
28
    {
×
29
        if (version > HPX_AGAS_VERSION)
30
        {
×
31
            HPX_THROW_EXCEPTION(hpx::error::version_too_new, "gva::load",
32
                "trying to load GVA with unknown version");
×
33
        }
34

35
        std::size_t lva;
36
        ar >> prefix >> type >> count >> lva >> offset;    //-V128
37
        lva_ = reinterpret_cast<lva_type>(lva);
×
38
    }
×
39

×
40
    template void gva::save(
41
        hpx::serialization::output_archive& ar, unsigned int const) const;
42

43
    template void gva::load(
44
        hpx::serialization::input_archive& ar, unsigned int const);
45

46
    ///////////////////////////////////////////////////////////////////////////
47
    std::ostream& operator<<(std::ostream& os, gva const& addr)
48
    {
×
49
        hpx::util::ios_flags_saver ifs(os);
50
        os << "(" << addr.prefix << " "
×
51
           << components::get_component_type_name(addr.type) << " "
×
52
           << addr.count << " " << std::showbase << std::hex << addr.lva()
×
53
           << " " << addr.offset << ")";
×
54
        return os;
×
55
    }
×
56
}    // namespace hpx::agas
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