Turi Create  4.0
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_LAMBDA_INTERFACE_HPP
7 #define TURI_LAMBDA_LAMBDA_INTERFACE_HPP
8 #include <core/data/flexible_type/flexible_type.hpp>
9 #include <core/system/cppipc/cppipc.hpp>
10 #include <core/storage/sframe_data/sframe_rows.hpp>
11 #include <core/system/cppipc/magic_macros.hpp>
12 
13 namespace turi {
14 
15 namespace lambda {
16 
17 enum class bulk_eval_serialized_tag:char {
18  BULK_EVAL_ROWS = 0,
19  BULK_EVAL_DICT_ROWS = 1,
20 };
21 
22 GENERATE_INTERFACE_AND_PROXY(lambda_evaluator_interface, lambda_evaluator_proxy,
23  (size_t, make_lambda, (const std::string&))
24  (void, release_lambda, (size_t))
25  (std::vector<flexible_type>, bulk_eval, (size_t)(const std::vector<flexible_type>&)(bool)(uint64_t))
26  (std::vector<flexible_type>, bulk_eval_rows, (size_t)(const sframe_rows&)(bool)(uint64_t))
27  (std::vector<flexible_type>, bulk_eval_dict, (size_t)(const std::vector<std::string>&)(const std::vector<std::vector<flexible_type>>&)(bool)(uint64_t))
28  (std::vector<flexible_type>, bulk_eval_dict_rows, (size_t)(const std::vector<std::string>&)(const sframe_rows&)(bool)(uint64_t))
29  (std::string, initialize_shared_memory_comm, )
30  )
31 } // namespace lambda
32 } // namespace turi
33 
34 #endif
#define GENERATE_INTERFACE_AND_PROXY(base_name, proxy_name, functions)