Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
ce475f6b
Commit
ce475f6b
authored
Sep 13, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some debugging of memory leaks
parent
321468f9
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 @
ce475f6b
...
...
@@ -188,14 +188,15 @@ int8_t polar_decoder(
//Keep only the best "listSize" number of entries.
if
(
currentListSize
>
listSize
)
{
for
(
int
i
=
0
;
i
<
2
*
l
istSize
;
i
++
)
{
for
(
int
i
=
0
;
i
<
currentL
istSize
;
i
++
)
{
listIndex
[
i
]
=
i
;
pathMetric
[
i
]
=
dlist
[
i
].
pathMetric
;
}
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.
uint8_t swaps, tempInd;
...
...
@@ -275,7 +276,7 @@ int8_t polar_decoder(
}
currentListSize = listSize;
}*/
stop_meas
(
sorting
);
}
for
(
int
i
=
0
;
i
<
polarParams
->
crcParityBits
;
i
++
)
{
...
...
@@ -298,7 +299,9 @@ int8_t polar_decoder(
//perror("[SCL polar decoder] All list entries have failed the CRC checks.");
free
(
d_tilde
);
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
));
// printf("error: Freeing dlist[%d].llr %p\n",i,dlist[i].bit);
nr_free_double_2D_array
(
dlist
[
i
].
llr
,
(
polarParams
->
n
+
1
));
free
(
dlist
[
i
].
crcChecksum
);
}
...
...
@@ -336,6 +339,7 @@ int8_t polar_decoder(
free
(
d_tilde
);
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_double_2D_array
(
dlist
[
i
].
llr
,
(
polarParams
->
n
+
1
));
free
(
dlist
[
i
].
crcChecksum
);
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
View file @
ce475f6b
...
...
@@ -159,7 +159,7 @@ void updateCrcChecksum2(decoder_list_t **dlist, uint8_t **crcGen,
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
**
crc11_generator_matrix
(
uint16_t
payloadSizeBits
);
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c
View file @
ce475f6b
...
...
@@ -144,14 +144,14 @@ void nr_free_double_2D_array(double **input, uint16_t xlen) {
}
// Modified Bubble Sort.
void
nr_sort_asc_double_1D_array_ind
(
double
*
matrix
,
uint8_t
*
ind
,
uint8_
t
len
)
{
uint8_
t
swaps
;
void
nr_sort_asc_double_1D_array_ind
(
double
*
matrix
,
int
*
ind
,
in
t
len
)
{
in
t
swaps
;
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
;
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
])
{
temp
=
matrix
[
j
];
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