12 int main(
int argc,
char **argv){
14 if (argc!=2){cerr<<
"Usage in.c "<<endl;
return -1;}
15 std::ifstream file(argv[1]);
16 std::vector<uint64_t> tags;
17 std::vector< bitset<NBITS> > bits;
21 std::getline(file,line);
24 for(
int i=0;i<line.size();i++)
25 if (line[i]==
'=') start=1;
27 if( start==1 && line[i]!=
';' && line[i]!=
'U' && line[i]!=
'L')
28 number.push_back(line[i]);
32 stringstream sstr;sstr<<number;
34 sstr>>std::hex>>unumber;
35 tags.push_back(unumber);
36 bits.push_back(bitset<NBITS>(unumber));
40 cout<<
"vector<uint64_t> codes={";
41 for(
int i=0;i<bits.size();i++){
42 uint64_t code=bits[i].to_ullong();
43 cout<<
"0x"<<std::hex<<code<<
"UL";
44 if (i<bits.size()-1)cout<<
",";
int main(int argc, char **argv)