fixes for machine without CUDA
This commit is contained in:
@@ -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,
|
|||||||
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,
|
|||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user