Turi Create  4.0
graph_lambda_interface.hpp
1 /* Copyright © 2017 Apple Inc. All rights reserved.
2  *
3  * Use of this source code is governed by a BSD-3-clause license that can
4  * be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
5  */
6 #ifndef TURI_LAMBDA_GRAPH_LAMBDA_INTERFACE_HPP
7 #define TURI_LAMBDA_GRAPH_LAMBDA_INTERFACE_HPP
8 #include <core/storage/sgraph_data/sgraph_types.hpp>
9 #include <core/storage/sgraph_data/sgraph_synchronize.hpp>
10 #include <core/system/cppipc/cppipc.hpp>
11 #include <core/system/cppipc/magic_macros.hpp>
12 
13 namespace turi {
14 
15 namespace lambda {
16 
17 typedef sgraph_compute::vertex_partition_exchange vertex_partition_exchange;
18 
19 GENERATE_INTERFACE_AND_PROXY(graph_lambda_evaluator_interface, graph_lambda_evaluator_proxy,
20  (std::vector<sgraph_edge_data>, eval_triple_apply, (const std::vector<sgraph_edge_data>&)(size_t)(size_t)(const std::vector<size_t>&))
21  (void, init, (const std::string&)(size_t)(const std::vector<std::string>&)(const std::vector<std::string>&)(size_t)(size_t))
22  (void, load_vertex_partition, (size_t)(std::vector<sgraph_vertex_data>&))
23  (bool, is_loaded, (size_t))
24  (void, update_vertex_partition, (vertex_partition_exchange&))
25  (vertex_partition_exchange, get_vertex_partition_exchange, (size_t)(const std::unordered_set<size_t>&)(const std::vector<size_t>&))
26  (void, clear, )
27  )
28 } // namespace lambda
29 } // namespace turi
30 
31 #endif
#define GENERATE_INTERFACE_AND_PROXY(base_name, proxy_name, functions)