• 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
/components/component_storage/src/component_storage.cpp
1
//  Copyright (c) 2015 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/assert.hpp>
9
#include <hpx/modules/async_distributed.hpp>
10
#include <hpx/modules/type_support.hpp>
11
#include <hpx/runtime_components/new.hpp>
12

13
#include <hpx/components/component_storage/component_storage.hpp>
14

15
#include <cstddef>
16
#include <utility>
17
#include <vector>
18

19
#include <hpx/config/warnings_prefix.hpp>
20

×
21
namespace hpx { namespace components {
×
22
    component_storage::component_storage(hpx::id_type target_locality)
23
      : base_type(hpx::new_<server::component_storage>(target_locality))
×
24
    {
25
    }
×
26

×
27
    component_storage::component_storage(hpx::future<hpx::id_type>&& f)
28
      : base_type(HPX_MOVE(f))
×
29
    {
30
    }
31

×
32
    ///////////////////////////////////////////////////////////////////////////
33
    hpx::future<hpx::id_type> component_storage::migrate_to_here(
34
        std::vector<char> const& data, hpx::id_type const& id,
35
        naming::address const& addr)
36
    {
37
#if !defined(HPX_COMPUTE_DEVICE_CODE)
×
38
        typedef server::component_storage::migrate_to_here_action action_type;
39
        return hpx::async<action_type>(this->get_id(), data, id, addr);
40
#else
41
        HPX_ASSERT(false);
42
        HPX_UNUSED(data);
43
        HPX_UNUSED(id);
44
        HPX_UNUSED(addr);
45
        return hpx::make_ready_future(hpx::id_type{});
46
#endif
47
    }
×
48

49
    hpx::id_type component_storage::migrate_to_here(launch::sync_policy,
50
        std::vector<char> const& data, hpx::id_type const& id,
51
        naming::address const& addr)
×
52
    {
53
        return migrate_to_here(data, id, addr).get();
54
    }
×
55

56
    hpx::future<std::vector<char>> component_storage::migrate_from_here(
57
        naming::gid_type const& id)
58
    {
59
#if !defined(HPX_COMPUTE_DEVICE_CODE)
×
60
        typedef server::component_storage::migrate_from_here_action action_type;
61
        return hpx::async<action_type>(this->get_id(), id);
62
#else
63
        HPX_ASSERT(false);
64
        HPX_UNUSED(id);
65
        return hpx::make_ready_future(std::vector<char>{});
66
#endif
67
    }
×
68

69
    std::vector<char> component_storage::migrate_from_here(
70
        launch::sync_policy, naming::gid_type const& id)
×
71
    {
72
        return migrate_from_here(id).get();
73
    }
×
74

75
    hpx::future<std::size_t> component_storage::size() const
76
    {
77
#if !defined(HPX_COMPUTE_DEVICE_CODE)
×
78
        typedef server::component_storage::size_action action_type;
79
        return hpx::async<action_type>(this->get_id());
80
#else
81
        HPX_ASSERT(false);
82
        return hpx::make_ready_future(std::size_t{});
83
#endif
84
    }
×
85

86
    std::size_t component_storage::size(launch::sync_policy) const
×
87
    {
88
        return size().get();
89
    }
90
}}    // namespace hpx::components
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