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
zzha zzha
OpenXG-RAN
Commits
376baa32
Commit
376baa32
authored
Jun 03, 2020
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes for machine without CUDA
parent
a2ffa29f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
openair1/PHY/CODING/TESTBENCH/ldpctest.c
openair1/PHY/CODING/TESTBENCH/ldpctest.c
+13
-12
No files found.
openair1/PHY/CODING/TESTBENCH/ldpctest.c
View file @
376baa32
...
@@ -27,9 +27,7 @@
...
@@ -27,9 +27,7 @@
#include "SIMULATION/TOOLS/sim.h"
#include "SIMULATION/TOOLS/sim.h"
#include "PHY/CODING/nrLDPC_extern.h"
#include "PHY/CODING/nrLDPC_extern.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
// extern "C" {
#include "openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.h"
#include "openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.h"
// }
#define MAX_NUM_DLSCH_SEGMENTS 16
#define MAX_NUM_DLSCH_SEGMENTS 16
#define MAX_BLOCK_LENGTH 8448
#define MAX_BLOCK_LENGTH 8448
...
@@ -105,7 +103,7 @@ int test_ldpc(short No_iteration,
...
@@ -105,7 +103,7 @@ int test_ldpc(short No_iteration,
time_stats_t
*
time_optim
,
time_stats_t
*
time_optim
,
time_stats_t
*
time_decoder
,
time_stats_t
*
time_decoder
,
n_iter_stats_t
*
dec_iter
,
n_iter_stats_t
*
dec_iter
,
short
run_cuda
)
short
run_cuda
)
{
{
//clock initiate
//clock initiate
//time_stats_t time,time_optim,tinput,tprep,tparity,toutput, time_decoder;
//time_stats_t time,time_optim,tinput,tprep,tparity,toutput, time_decoder;
...
@@ -402,19 +400,22 @@ int test_ldpc(short No_iteration,
...
@@ -402,19 +400,22 @@ int test_ldpc(short No_iteration,
for
(
j
=
0
;
j
<
n_segments
;
j
++
)
{
for
(
j
=
0
;
j
<
n_segments
;
j
++
)
{
start_meas
(
time_decoder
);
start_meas
(
time_decoder
);
#ifdef __CUDACC__
if
(
run_cuda
){
if
(
run_cuda
){
printf
(
"***********run ldpc by cuda
\n
"
);
printf
(
"***********run ldpc by cuda
\n
"
);
n_iter
=
nrLDPC_decoder_LYC
(
&
decParams
,
(
int8_t
*
)
channel_output_fixed
[
j
],
(
int8_t
*
)
estimated_output
[
j
],
block_length
,
time_decoder
);
n_iter
=
nrLDPC_decoder_LYC
(
&
decParams
,
(
int8_t
*
)
channel_output_fixed
[
j
],
(
int8_t
*
)
estimated_output
[
j
],
block_length
,
time_decoder
);
}
}
else
{
else
{
printf
(
"**************run ldpc by cpu
\n
"
);
printf
(
"**************run ldpc by cpu
\n
"
);
// decode the sequence
// decode the sequence
// decoder supports BG2, Z=128 & 256
// decoder supports BG2, Z=128 & 256
//esimated_output=ldpc_decoder(channel_output_fixed, block_length, No_iteration, (double)((float)nom_rate/(float)denom_rate));
//esimated_output=ldpc_decoder(channel_output_fixed, block_length, No_iteration, (double)((float)nom_rate/(float)denom_rate));
///nrLDPC_decoder(&decParams, channel_output_fixed, estimated_output, NULL);
///nrLDPC_decoder(&decParams, channel_output_fixed, estimated_output, NULL);
n_iter
=
nrLDPC_decoder
(
&
decParams
,
(
int8_t
*
)
channel_output_fixed
[
j
],
(
int8_t
*
)
estimated_output
[
j
],
p_nrLDPC_procBuf
,
p_decoder_profiler
);
}
#else
n_iter
=
nrLDPC_decoder
(
&
decParams
,
(
int8_t
*
)
channel_output_fixed
[
j
],
(
int8_t
*
)
estimated_output
[
j
],
p_nrLDPC_procBuf
,
p_decoder_profiler
);
n_iter
=
nrLDPC_decoder
(
&
decParams
,
(
int8_t
*
)
channel_output_fixed
[
j
],
(
int8_t
*
)
estimated_output
[
j
],
p_nrLDPC_procBuf
,
p_decoder_profiler
);
}
#endif
stop_meas
(
time_decoder
);
stop_meas
(
time_decoder
);
}
}
...
...
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