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
Michael Black
OpenXG-RAN
Commits
f1d5a92c
Commit
f1d5a92c
authored
Jan 31, 2023
by
Roberto Louro Magueta
Committed by
laurent
Feb 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Memory free in nr_zero_forcing_rx() function
parent
27f242ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
11 deletions
+33
-11
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+33
-11
No files found.
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
f1d5a92c
...
@@ -2198,7 +2198,7 @@ uint8_t nr_zero_forcing_rx(uint32_t rx_size,
...
@@ -2198,7 +2198,7 @@ uint8_t nr_zero_forcing_rx(uint32_t rx_size,
int
length
)
int
length
)
{
{
int
*
ch0r
,
*
ch0c
;
int
*
ch0r
,
*
ch0c
;
int32_t
***
conjH_H_elements
;
int32_t
***
conjH_H_elements
;
uint32_t
nb_rb_0
=
length
/
12
+
((
length
%
12
)
?
1
:
0
);
uint32_t
nb_rb_0
=
length
/
12
+
((
length
%
12
)
?
1
:
0
);
int32_t
determ_fin
[
12
*
nb_rb_0
]
__attribute__
((
aligned
(
32
)));
int32_t
determ_fin
[
12
*
nb_rb_0
]
__attribute__
((
aligned
(
32
)));
...
@@ -2233,11 +2233,11 @@ uint8_t nr_zero_forcing_rx(uint32_t rx_size,
...
@@ -2233,11 +2233,11 @@ uint8_t nr_zero_forcing_rx(uint32_t rx_size,
//Compute the inverse and determinant of the H^*H matrix
//Compute the inverse and determinant of the H^*H matrix
//Allocate the inverse matrix
//Allocate the inverse matrix
int32_t
**
inv_H_h_H
;
int32_t
**
inv_H_h_H
;
inv_H_h_H
=
(
int32_t
**
)
malloc16_clear
(
n_tx
*
n_tx
*
sizeof
(
int32_t
*
)
);
inv_H_h_H
=
(
int32_t
**
)
malloc16_clear
(
n_tx
*
n_tx
*
sizeof
(
int32_t
*
)
);
for
(
int
rtx
=
0
;
rtx
<
n_tx
;
rtx
++
)
{
//
row
for
(
int
rtx
=
0
;
rtx
<
n_tx
;
rtx
++
)
{
//
row
for
(
int
ctx
=
0
;
ctx
<
n_tx
;
ctx
++
)
{
//
column
for
(
int
ctx
=
0
;
ctx
<
n_tx
;
ctx
++
)
{
//
column
inv_H_h_H
[
ctx
*
n_tx
+
rtx
]
=
(
int32_t
*
)
malloc16_clear
(
12
*
nb_rb_0
*
sizeof
(
int32_t
)
);
inv_H_h_H
[
ctx
*
n_tx
+
rtx
]
=
(
int32_t
*
)
malloc16_clear
(
12
*
nb_rb_0
*
sizeof
(
int32_t
)
);
}
}
}
}
int
fp_flag
=
1
;
//0: float point calc 1: Fixed point calc
int
fp_flag
=
1
;
//0: float point calc 1: Fixed point calc
...
@@ -2253,10 +2253,10 @@ uint8_t nr_zero_forcing_rx(uint32_t rx_size,
...
@@ -2253,10 +2253,10 @@ uint8_t nr_zero_forcing_rx(uint32_t rx_size,
int32_t
outtemp
[
12
*
nb_rb_0
]
__attribute__
((
aligned
(
32
)));
int32_t
outtemp
[
12
*
nb_rb_0
]
__attribute__
((
aligned
(
32
)));
int32_t
**
rxdataF_zforcing
;
int32_t
**
rxdataF_zforcing
;
//Allocate rxdataF for zforcing out
//Allocate rxdataF for zforcing out
rxdataF_zforcing
=
(
int32_t
**
)
malloc16_clear
(
n_tx
*
sizeof
(
int32_t
*
)
);
rxdataF_zforcing
=
(
int32_t
**
)
malloc16_clear
(
n_tx
*
sizeof
(
int32_t
*
)
);
for
(
int
rtx
=
0
;
rtx
<
n_tx
;
rtx
++
)
{
//
row
for
(
int
rtx
=
0
;
rtx
<
n_tx
;
rtx
++
)
{
//
row
rxdataF_zforcing
[
rtx
]
=
(
int32_t
*
)
malloc16_clear
(
12
*
nb_rb_0
*
sizeof
(
int32_t
)
);
rxdataF_zforcing
[
rtx
]
=
(
int32_t
*
)
malloc16_clear
(
12
*
nb_rb_0
*
sizeof
(
int32_t
)
);
}
}
for
(
int
rtx
=
0
;
rtx
<
n_tx
;
rtx
++
)
{
//Output Layers row
for
(
int
rtx
=
0
;
rtx
<
n_tx
;
rtx
++
)
{
//Output Layers row
// loop over Layers rtx=0,...,N_Layers-1
// loop over Layers rtx=0,...,N_Layers-1
...
@@ -2342,7 +2342,29 @@ uint8_t nr_zero_forcing_rx(uint32_t rx_size,
...
@@ -2342,7 +2342,29 @@ uint8_t nr_zero_forcing_rx(uint32_t rx_size,
_mm_empty
();
_mm_empty
();
_m_empty
();
_m_empty
();
return
(
0
);
// Memory free
for
(
int
aarx
=
0
;
aarx
<
n_rx
;
aarx
++
)
{
for
(
int
rtx
=
0
;
rtx
<
n_tx
;
rtx
++
)
{
// row
for
(
int
ctx
=
0
;
ctx
<
n_tx
;
ctx
++
)
{
// column
free
(
conjH_H_elements
[
aarx
][
ctx
*
n_tx
+
rtx
]);
}
}
free
(
conjH_H_elements
[
aarx
]);
}
free
(
conjH_H_elements
);
for
(
int
rtx
=
0
;
rtx
<
n_tx
;
rtx
++
)
{
// row
for
(
int
ctx
=
0
;
ctx
<
n_tx
;
ctx
++
)
{
// column
free
(
inv_H_h_H
[
ctx
*
n_tx
+
rtx
]);
}
}
free
(
inv_H_h_H
);
for
(
int
rtx
=
0
;
rtx
<
n_tx
;
rtx
++
)
{
// row
free
(
rxdataF_zforcing
[
rtx
]);
}
free
(
rxdataF_zforcing
);
return
0
;
}
}
static
void
nr_dlsch_layer_demapping
(
int16_t
*
llr_cw
[
2
],
static
void
nr_dlsch_layer_demapping
(
int16_t
*
llr_cw
[
2
],
...
...
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