?? term_system.cpp
字號:
#include "term_system.h"
//#include "init_system.h"
/*
**********************************************************************************
FILENAME: ldpc.c
version 0.1
(C) Pan Yu, 2004
Declaration:
All right is deserved by author
Anyone use this source codes and remove author's name is prohibited
Without agreement,noboby can copy this codes to others.
Fucntion Description:
Simulation ends in this file! all memory are free!
*********************************************************************************
ChangeLog:
2004-07-10 : start
2004-10-22 : add to free memory for min-sum function
**********************************************************************************
*/
void Term_system(){
int i;
// fclose(sys_spt.fp_result);
for (i=0;i<sys_spt.col_num;i++)
{
if (sys_spt.bit_nodes.index[i]!=NULL)
{
free(sys_spt.bit_nodes.index[i]);
}
}
if (sys_spt.bit_nodes.index!=NULL)
{
free(sys_spt.bit_nodes.index);
}
for (i=0;i<sys_spt.row_num;i++)
{
if (sys_spt.check_nodes.index[i]!=NULL)
{
free(sys_spt.check_nodes.index[i]);
}
}
if (sys_spt.check_nodes.index!=NULL)
{
free(sys_spt.check_nodes.index);
}
for (i=0;i<sys_spt.col_num;i++)
{
if (sys_spt.bit_nodes.llr[i]!=NULL)
{
free(sys_spt.bit_nodes.llr[i]);
}
}
if (sys_spt.bit_nodes.llr!=NULL)
{
free(sys_spt.bit_nodes.llr);
}
if (sys_spt.bit_nodes.size!=NULL)
{
free(sys_spt.bit_nodes.size);
}
if (sys_spt.bit_nodes.size!=NULL)
{
free(sys_spt.check_nodes.size);
}
if (sys_spt.G_sp_col!=NULL)
{
free(sys_spt.G_sp_col);
}
if (sys_spt.message_locations!=NULL)
{
free(sys_spt.message_locations);
}
if (sys_spt.source_bits!=NULL)
{
free(sys_spt.source_bits);
}
if (sys_spt.source_code!=NULL)
{
free(sys_spt.source_code);
}
if (sys_spt.source_bits_in!=NULL)
{
free(sys_spt.source_bits_in);
}
if (sys_spt.source_bits_out!=NULL)
{
free(sys_spt.source_bits_out);
}
if (sys_spt.send_code!=NULL)
{
free(sys_spt.send_code);
}
if (sys_spt.rece_code!=NULL)
{
free(sys_spt.rece_code);
}
if (sys_spt.llr_init!=NULL)
{
free(sys_spt.llr_init);
}
if (sys_spt.check_nodes.llr!=NULL)
{
free(sys_spt.check_nodes.llr);
}
if (sys_spt.bit_nodes.llr_sum!=NULL)
{
free(sys_spt.bit_nodes.llr_sum);
}
if (sys_spt.bit_nodes.llr_in!=NULL)
{
free(sys_spt.bit_nodes.llr_in);
}
if (sys_spt.bit_nodes.llr_out!=NULL)
{
free(sys_spt.bit_nodes.llr_out);
}
if (sys_spt.check_nodes.llr_sign!=NULL)
{
free(sys_spt.check_nodes.llr_sign);
}
//add 2004-10-22 to free memory for min-sum
if (sys_spt.check_nodes.llr_min!=NULL)
{
free(sys_spt.check_nodes.llr_min);
}
if (sys_spt.check_nodes.llr_sub_min!=NULL)
{
free(sys_spt.check_nodes.llr_sub_min);
}
if (sys_spt.check_nodes.llr_sub_min2!=NULL)
{
free(sys_spt.check_nodes.llr_sub_min2);
}
for (i=0;i<sys_spt.col_num;i++)
{
if (sys_spt.bit_nodes.llr_sign[i]!=NULL)
{
free(sys_spt.bit_nodes.llr_sign[i]);
}
}
if (sys_spt.bit_nodes.llr_sign!=NULL)
{
free(sys_spt.bit_nodes.llr_sign);
}
if (sys_spt.ber_iter!=NULL)
{
free(sys_spt.ber_iter);
}
if (sys_spt.error_iter!=NULL)
{
free(sys_spt.error_iter);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -