namespace dataframe¶
// namespaces namespace xf::data_analytics::dataframe::internal // enums enum TypeFlags // structs struct FieldInfo struct Node struct Object
csvParser¶
#include "xf_data_analytics/dataframe/csv_parser.hpp"
template <int PU_NUM = 8> void csvParser ( ap_uint <128>* csv_buf, ap_uint <8>* schema, hls::stream <Object>& o_obj_strm )
read one standard CSV file from DDR and parse into object stream with schma defination
Parameters:
PU_NUM | number of CSV parse core, only support 2/4/8 |
csv_buf | buffer of CSV file |
schema | name, data type and is_filter flag for each column |
o_obj_strm | output object stream for selected columns |
jsonParser¶
#include "xf_data_analytics/dataframe/json_parser.hpp"
template < int PU_NUM = 4, int COL_NUM = 16 > void jsonParser ( ap_uint <128>* json_buf, ap_uint <8>* schema, hls::stream <Object>& o_obj_strm )
read one standard JSON file from DDR and parse into object stream with schma defination
Parameters:
PU_NUM | number of JSON parse core, only support 2/4/8 |
COL_NUM | number of maximum column, should be power of 2 |
json_buf | buffer of JSON file |
schema | name, data type and is_filter flag for each column |
o_obj_strm | output object stream for selected columns |
readFromDataFrame¶
#include "xf_data_analytics/dataframe/read_from_dataframe.hpp"
void readFromDataFrame ( int field_type [17], ap_uint <64>* ddr_buff, hls::stream <Object>& obj_strm )
read the data frame format data from DDR and pack into object streams
Parameters:
field_type | the data type of each field id (may obtained from schema) |
ddr_buff | the ddr that saves data |
obj_strm | output Object stream |
writeToDataFrame¶
#include "xf_data_analytics/dataframe/write_to_dataframe.hpp"
void writeToDataFrame ( hls::stream <Object>& obj_strm, ap_uint <64>* ddr_buff )
write object stream data to DDR
all field_id in each json line is unique maximum supported field_id number is 16
Parameters:
obj_strm | input stream data with type Object Struct |
ddr_buff | DDR buffer to save parserd data in DataFrame format |