-
Notifications
You must be signed in to change notification settings - Fork 15
/
ens2deg.cpp
50 lines (45 loc) · 1.56 KB
/
ens2deg.cpp
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*!
* \file
* \brief Program to convert .ens files to .deg files
* \author Michael Meidlinger
*
* -------------------------------------------------------------------------
*
* Copyright (C) 2017 Michael Meidlinger - All Rights Reserved
*
* This file is part of lut_ldpc, a software suite for simulating and designing
* LDPC decodes based on discrete Lookup Table (LUT) message passing
*
* lut_ldpc is free software: you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* lut_ldpc distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along
* with lut_ldpc. If not, see <http://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
#include <itpp/itbase.h>
#include "LDPC_Ensemble.hpp"
using namespace lut_ldpc;
using namespace itpp;
using namespace std;
int main(int argc, char **argv){
// Parse file name
if(argc!=3){
cout << "Usage: ens2deg infile.ens outfile.deg" << endl;
return EXIT_FAILURE;
}
string ensfilename(argv[1]);
string degfilename(argv[2]);
// Load ensemble
LDPC_Ensemble ens(ensfilename);
ens.export_deg(degfilename);
return EXIT_SUCCESS;
}