6 #ifndef TURI_UNITY_SARRAY_BUILDER_HPP 7 #define TURI_UNITY_SARRAY_BUILDER_HPP 10 #include <core/storage/sframe_data/sarray.hpp> 11 #include <boost/circular_buffer.hpp> 12 #include <model_server/lib/api/unity_sarray_builder_interface.hpp> 72 void append_multiple(
const std::vector<flexible_type> &vals,
size_t segment);
82 std::vector<flexible_type>
read_history(
size_t num_elems,
size_t segment);
87 std::shared_ptr<unity_sarray_base>
close();
95 bool m_inited =
false;
96 bool m_closed =
false;
97 std::shared_ptr<sarray<flexible_type>> m_sarray;
98 std::vector<sarray<flexible_type>::iterator> m_out_iters;
100 std::set<flex_type_enum> m_types_inserted;
102 std::vector<std::shared_ptr<boost::circular_buffer<flexible_type>>> m_history;
106 #endif // TURI_UNITY_SARRAY_BUILDER_HPP void append(const flexible_type &val, size_t segment)
void append_multiple(const std::vector< flexible_type > &vals, size_t segment)
void init(size_t num_segments, size_t history_size, flex_type_enum dtype)
std::shared_ptr< unity_sarray_base > close()
std::vector< flexible_type > read_history(size_t num_elems, size_t segment)
flex_type_enum get_type()