| Line | % of fetches | Source |
|---|---|---|
| 1 | /* | |
| 2 | * node_client.cpp | |
| 3 | * | |
| 4 | * Created on: Jun 12, 2015 | |
| 5 | * Author: dmarce1 | |
| 6 | */ | |
| 7 | ||
| 8 | #include "node_server.hpp" | |
| 9 | ||
| 10 | bool node_client::is_local() { | |
| 11 | return local; | |
| 12 | } | |
| 13 | ||
| 14 | hpx::id_type node_client::get_gid() const { | |
| 15 | return id; | |
| 16 | } | |
| 17 | ||
| 18 | node_client& node_client::operator=(hpx::future<hpx::id_type>&& fut) { | |
| 19 | id = fut.get(); | |
| 20 | if( !empty() ) { | |
| 21 | local = bool(hpx::get_colocation_id(id).get() == hpx::find_here()); | |
| 22 | } | |
| 23 | return *this; | |
| 24 | } | |
| 25 | ||
| 26 | node_client& node_client::operator=(const hpx::id_type& _id) { | |
| 27 | id = _id; | |
| 28 | if (!empty()) { | |
| 29 | local = bool(hpx::get_colocation_id(id).get() == hpx::find_here()); | |
| 30 | } | |
| 31 | return *this; | |
| 32 | } | |
| 33 | ||
| 34 | node_client::node_client(hpx::future<hpx::id_type>&& fut) { | |
| 35 | id = fut.get(); | |
| 36 | if( !empty() ) { | |
| 37 | local = bool(hpx::get_colocation_id(id).get() == hpx::find_here()); | |
| 38 | } | |
| 39 | } | |
| 40 | ||
| 41 | node_client::node_client(const hpx::id_type& _id) { | |
| 42 | id = _id; | |
| 43 | if (!empty()) { | |
| 44 | local = bool(hpx::get_colocation_id(id).get() == hpx::find_here()); | |
| 45 | } | |
| 46 | } | |
| 47 | ||
| 48 | node_client::node_client() { | |
| 49 | local = true; | |
| 50 | } | |
| 51 | ||
| 52 | //hpx::future<grid::output_list_type> node_client::output() const { | |
| 53 | // return hpx::async<typename node_server::output_action>(get_gid(), std::string("")); | |
| 54 | //} | |
| 55 | ||
| 56 | bool node_client::empty() const { | |
| 57 | return get_gid() == hpx::invalid_id; | |
| 58 | } | |
| 59 | ||
| 60 | void node_client::report_timing() const { | |
| 61 | hpx::async<typename node_server::report_timing_action>(get_gid()).get(); | |
| 62 | } | |
| 63 |
Copyright (c) 2006-2012 Rogue Wave Software, Inc. All Rights Reserved.
Patents pending.