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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
2f278395
Commit
2f278395
authored
Nov 20, 2024
by
Jaroslava Fiedlerova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
T2: Rework retrieve_ldpc_enc_op()
parent
0021b696
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c
+13
-14
No files found.
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c
View file @
2f278395
...
...
@@ -595,23 +595,22 @@ static int retrieve_ldpc_dec_op(struct rte_bbdev_dec_op **ops, const uint16_t n,
static
int
retrieve_ldpc_enc_op
(
struct
rte_bbdev_enc_op
**
ops
,
const
uint16_t
n
,
uint8_t
*
p_out
,
nrLDPC_params_per_cb_t
*
perCB
)
{
struct
rte_bbdev_op_data
*
output
;
struct
rte_mbuf
*
m
;
unsigned
int
i
;
char
*
data
;
uint8_t
*
out
;
int
offset
=
0
;
for
(
i
=
0
;
i
<
n
;
++
i
)
{
output
=
&
ops
[
i
]
->
ldpc_enc
.
output
;
m
=
output
->
data
;
for
(
i
nt
i
=
0
;
i
<
n
;
++
i
)
{
struct
rte_bbdev_op_data
*
output
=
&
ops
[
i
]
->
ldpc_enc
.
output
;
struct
rte_mbuf
*
m
=
output
->
data
;
uint16_t
data_len
=
rte_pktmbuf_data_len
(
m
)
-
output
->
offset
;
out
=
&
p_out
[
offset
];
data
=
m
->
buf_addr
;
for
(
int
byte
=
0
;
byte
<
data_len
;
byte
++
)
for
(
int
bit
=
0
;
bit
<
8
;
bit
++
)
out
[
byte
*
8
+
bit
]
=
(
data
[
m
->
data_off
+
byte
]
>>
(
7
-
bit
))
&
1
;
uint8_t
*
out
=
&
p_out
[
offset
];
const
char
*
data
=
m
->
buf_addr
+
m
->
data_off
;
const
char
*
end
=
data
+
data_len
;
while
(
data
<
end
)
{
uint8_t
byte
=
*
data
++
;
// get the current byte
for
(
int
bit
=
7
;
bit
>=
0
;
--
bit
)
{
*
out
++
=
(
byte
>>
bit
)
&
1
;
// extract each bit
}
}
offset
+=
perCB
[
i
].
E_cb
;
rte_pktmbuf_free
(
ops
[
i
]
->
ldpc_enc
.
output
.
data
);
rte_pktmbuf_free
(
m
);
rte_pktmbuf_free
(
ops
[
i
]
->
ldpc_enc
.
input
.
data
);
}
return
0
;
...
...
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