Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhongxiao
OpenXG-RAN
Commits
720d0d31
Commit
720d0d31
authored
Sep 13, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some debugging of memory leaks
parent
d5e94b2c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
12 deletions
+16
-12
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
+8
-4
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
+1
-1
openair1/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c
...air1/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c
+7
-7
No files found.
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
View file @
720d0d31
...
@@ -188,14 +188,15 @@ int8_t polar_decoder(
...
@@ -188,14 +188,15 @@ int8_t polar_decoder(
//Keep only the best "listSize" number of entries.
//Keep only the best "listSize" number of entries.
if
(
currentListSize
>
listSize
)
{
if
(
currentListSize
>
listSize
)
{
for
(
int
i
=
0
;
i
<
2
*
l
istSize
;
i
++
)
{
for
(
int
i
=
0
;
i
<
currentL
istSize
;
i
++
)
{
listIndex
[
i
]
=
i
;
listIndex
[
i
]
=
i
;
pathMetric
[
i
]
=
dlist
[
i
].
pathMetric
;
pathMetric
[
i
]
=
dlist
[
i
].
pathMetric
;
}
}
nr_sort_asc_double_1D_array_ind
(
pathMetric
,
listIndex
,
currentListSize
);
nr_sort_asc_double_1D_array_ind
(
pathMetric
,
listIndex
,
currentListSize
);
for
(
int
i
=
0
;
i
<
2
*
listSize
;
i
++
)
sorted_dlist
[
i
]
=&
dlist
[
listIndex
[
i
]]
;
currentListSize
=
listSize
;
}
}
stop_meas
(
sorting
);
/*
/*
//sort listIndex[listSize, ..., 2*listSize-1] in descending order.
//sort listIndex[listSize, ..., 2*listSize-1] in descending order.
uint8_t swaps, tempInd;
uint8_t swaps, tempInd;
...
@@ -275,7 +276,7 @@ int8_t polar_decoder(
...
@@ -275,7 +276,7 @@ int8_t polar_decoder(
}
}
currentListSize = listSize;
currentListSize = listSize;
}*/
}*/
stop_meas
(
sorting
);
}
}
for
(
int
i
=
0
;
i
<
polarParams
->
crcParityBits
;
i
++
)
{
for
(
int
i
=
0
;
i
<
polarParams
->
crcParityBits
;
i
++
)
{
...
@@ -298,7 +299,9 @@ int8_t polar_decoder(
...
@@ -298,7 +299,9 @@ int8_t polar_decoder(
//perror("[SCL polar decoder] All list entries have failed the CRC checks.");
//perror("[SCL polar decoder] All list entries have failed the CRC checks.");
free
(
d_tilde
);
free
(
d_tilde
);
for
(
int
i
=
0
;
i
<
2
*
listSize
;
i
++
)
{
for
(
int
i
=
0
;
i
<
2
*
listSize
;
i
++
)
{
// printf("error: Freeing dlist[%d].bit %p\n",i,dlist[i].bit);
nr_free_uint8_t_2D_array
(
dlist
[
i
].
bit
,
(
polarParams
->
n
+
1
));
nr_free_uint8_t_2D_array
(
dlist
[
i
].
bit
,
(
polarParams
->
n
+
1
));
// printf("error: Freeing dlist[%d].llr %p\n",i,dlist[i].bit);
nr_free_double_2D_array
(
dlist
[
i
].
llr
,
(
polarParams
->
n
+
1
));
nr_free_double_2D_array
(
dlist
[
i
].
llr
,
(
polarParams
->
n
+
1
));
free
(
dlist
[
i
].
crcChecksum
);
free
(
dlist
[
i
].
crcChecksum
);
}
}
...
@@ -336,6 +339,7 @@ int8_t polar_decoder(
...
@@ -336,6 +339,7 @@ int8_t polar_decoder(
free
(
d_tilde
);
free
(
d_tilde
);
for
(
int
i
=
0
;
i
<
2
*
listSize
;
i
++
)
{
for
(
int
i
=
0
;
i
<
2
*
listSize
;
i
++
)
{
// printf("correct: Freeing dlist[%d].bit %p\n",i,dlist[i].bit);
nr_free_uint8_t_2D_array
(
dlist
[
i
].
bit
,
(
polarParams
->
n
+
1
));
nr_free_uint8_t_2D_array
(
dlist
[
i
].
bit
,
(
polarParams
->
n
+
1
));
nr_free_double_2D_array
(
dlist
[
i
].
llr
,
(
polarParams
->
n
+
1
));
nr_free_double_2D_array
(
dlist
[
i
].
llr
,
(
polarParams
->
n
+
1
));
free
(
dlist
[
i
].
crcChecksum
);
free
(
dlist
[
i
].
crcChecksum
);
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
View file @
720d0d31
...
@@ -159,7 +159,7 @@ void updateCrcChecksum2(decoder_list_t **dlist, uint8_t **crcGen,
...
@@ -159,7 +159,7 @@ void updateCrcChecksum2(decoder_list_t **dlist, uint8_t **crcGen,
uint8_t
listSize
,
uint32_t
i2
,
uint8_t
len
);
uint8_t
listSize
,
uint32_t
i2
,
uint8_t
len
);
void
nr_sort_asc_double_1D_array_ind
(
double
*
matrix
,
uint8_t
*
ind
,
uint8_
t
len
);
void
nr_sort_asc_double_1D_array_ind
(
double
*
matrix
,
int
*
ind
,
in
t
len
);
uint8_t
**
crc24c_generator_matrix
(
uint16_t
payloadSizeBits
);
uint8_t
**
crc24c_generator_matrix
(
uint16_t
payloadSizeBits
);
uint8_t
**
crc11_generator_matrix
(
uint16_t
payloadSizeBits
);
uint8_t
**
crc11_generator_matrix
(
uint16_t
payloadSizeBits
);
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c
View file @
720d0d31
...
@@ -144,14 +144,14 @@ void nr_free_double_2D_array(double **input, uint16_t xlen) {
...
@@ -144,14 +144,14 @@ void nr_free_double_2D_array(double **input, uint16_t xlen) {
}
}
// Modified Bubble Sort.
// Modified Bubble Sort.
void
nr_sort_asc_double_1D_array_ind
(
double
*
matrix
,
uint8_t
*
ind
,
uint8_
t
len
)
{
void
nr_sort_asc_double_1D_array_ind
(
double
*
matrix
,
int
*
ind
,
in
t
len
)
{
uint8_
t
swaps
;
in
t
swaps
;
double
temp
;
double
temp
;
uint8_
t
tempInd
;
in
t
tempInd
;
for
(
uint8_
t
i
=
0
;
i
<
len
;
i
++
)
{
for
(
in
t
i
=
0
;
i
<
len
;
i
++
)
{
swaps
=
0
;
swaps
=
0
;
for
(
uint8_
t
j
=
0
;
j
<
(
len
-
i
)
-
1
;
j
++
)
{
for
(
in
t
j
=
0
;
j
<
(
len
-
i
)
-
1
;
j
++
)
{
if
(
matrix
[
j
]
>
matrix
[
j
+
1
])
{
if
(
matrix
[
j
]
>
matrix
[
j
+
1
])
{
temp
=
matrix
[
j
];
temp
=
matrix
[
j
];
matrix
[
j
]
=
matrix
[
j
+
1
];
matrix
[
j
]
=
matrix
[
j
+
1
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment