/
locality_annotation.hpp
46 lines (34 loc) · 1.38 KB
/
locality_annotation.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
// Copyright (c) 2019 Hartmut Kaiser
//
// 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)
#if !defined(PHYLANX_PRIMITIVES_LOCALITY_ANNOTATION_JUN_28_2019_1123AM)
#define PHYLANX_PRIMITIVES_LOCALITY_ANNOTATION_JUN_28_2019_1123AM
#include <phylanx/config.hpp>
#include <phylanx/execution_tree/annotation.hpp>
#include <phylanx/ir/ranges.hpp>
#include <hpx/lcos/future.hpp>
#include <cstdint>
#include <string>
namespace phylanx { namespace execution_tree
{
////////////////////////////////////////////////////////////////////////////
struct locality_information
{
PHYLANX_EXPORT locality_information();
locality_information(
std::uint32_t locality_id, std::uint32_t num_localities)
: locality_id_(locality_id)
, num_localities_(num_localities)
{}
PHYLANX_EXPORT locality_information(ir::range const& data,
std::string const& name, std::string const& codename);
PHYLANX_EXPORT execution_tree::annotation as_annotation() const;
std::uint32_t locality_id_;
std::uint32_t num_localities_;
};
PHYLANX_EXPORT locality_information extract_locality_information(
execution_tree::annotation const& ann, std::string const& name,
std::string const& codename);
}}
#endif