forked from kiabuzz/CompressedLUT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompressedlut.h
33 lines (28 loc) · 1.6 KB
/
compressedlut.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
----------------------------------------------------
C o m p r e s s ed LUT
----------------------------------------------------
*/
# ifndef __COMPRESSEDLUT_H
# define __COMPRESSEDLUT_H
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <numeric>
#include "exprtk.hpp"
using namespace std;
namespace compressedlut {
struct struct_configs {int mdbw; bool hbs; bool ssc; bool mlc;};
void compressedlut(const vector<long int>& table_data, const string& table_name, const string& output_path, struct struct_configs configs, long int* initial_size, vector<long int>& final_size);
long int hb_compression(bool self_similarity, const vector<long int>& t_hb, int w_s, vector<long int>& t_ust, vector<long int>& t_bias, vector<long int>& t_idx, vector<long int>& t_rsh, const int wo_ust, const int w_l);
void rtl(const string& file_path, const string& table_name, const vector<int>& all_w_in, const vector<int>& all_w_out, const vector<int>& all_w_l, const vector<int>& all_w_s, const vector<vector<long int>>& all_t_lb, const vector<vector<long int>>& all_t_ust, const vector<vector<long int>>& all_t_bias, const vector<vector<long int>>& all_t_idx, const vector<vector<long int>>& all_t_rsh, int max_level, const int wo_ust);
void plaintable_rtl(const string& file_path, const string& table_name, const vector<long int>& table_data, bool set, const int width);
int bit_width(long int value);
int bit_width_signed(long int min_value, long int max_value);
void help();
}
# endif