-
-
Notifications
You must be signed in to change notification settings - Fork 422
/
completion_manager_queue.hpp
56 lines (44 loc) · 1.39 KB
/
completion_manager_queue.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright (c) 2023-2024 Jiakun Yan
// Copyright (c) 2014-2023 Thomas Heller
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#pragma once
#include <hpx/config.hpp>
#if defined(HPX_HAVE_NETWORKING) && defined(HPX_HAVE_PARCELPORT_LCI)
#include <hpx/parcelport_lci/config.hpp>
#include <hpx/parcelport_lci/completion_manager_base.hpp>
namespace hpx::parcelset::policies::lci {
struct completion_manager_queue : public completion_manager_base
{
completion_manager_queue(parcelport* pp)
: completion_manager_base(pp)
{
// LCI_queue_create(LCI_UR_DEVICE, &queue);
// Hack for now
LCI_queue_createx(LCI_UR_DEVICE,
LCI_SERVER_NUM_PKTS * (size_t) config_t::ndevices, &queue);
}
~completion_manager_queue()
{
LCI_queue_free(&queue);
}
LCI_comp_t alloc_completion()
{
return queue;
}
void enqueue_completion(LCI_comp_t comp)
{
HPX_UNUSED(comp);
}
LCI_request_t poll();
LCI_comp_t get_completion_object()
{
return queue;
}
private:
LCI_comp_t queue;
};
} // namespace hpx::parcelset::policies::lci
#endif