Commit e3747ea0 authored by Laurent THOMAS's avatar Laurent THOMAS Committed by Robert Schmidt

Fix small bugs in nrLDPC_tools, remain some warnings to fix

parent aed83c91
...@@ -14,10 +14,13 @@ void nrLDPC_bnProcPc_BG1_generator_AVX2(int R) ...@@ -14,10 +14,13 @@ void nrLDPC_bnProcPc_BG1_generator_AVX2(int R)
// system("mkdir -p ../ldpc_gen_files"); // system("mkdir -p ../ldpc_gen_files");
char fname[500]; char fname[FILENAME_MAX+1];
sprintf(fname,"../ldpc_gen_files/bnProcPc/nrLDPC_bnProcPc_BG1_R%s_AVX2.h",ratestr[R]); snprintf(fname, sizeof(fname), "../ldpc_gen_files/bnProcPc/nrLDPC_bnProcPc_BG1_R%s_AVX2.h", ratestr[R]);
FILE *fd=fopen(fname,"w"); FILE *fd=fopen(fname,"w");
if (fd == NULL) {printf("Cannot create \n");abort();} if (fd == NULL) {
printf("Cannot create file %s\n", fname);
abort();
}
// fprintf(fd,"#include <stdint.h>\n"); // fprintf(fd,"#include <stdint.h>\n");
// fprintf(fd,"#include <immintrin.h>\n"); // fprintf(fd,"#include <immintrin.h>\n");
......
...@@ -14,10 +14,13 @@ void nrLDPC_bnProcPc_BG2_generator_AVX2(int R) ...@@ -14,10 +14,13 @@ void nrLDPC_bnProcPc_BG2_generator_AVX2(int R)
// system("mkdir -p ../ldpc_gen_files"); // system("mkdir -p ../ldpc_gen_files");
char fname[50]; char fname[FILENAME_MAX+1];
sprintf(fname,"../ldpc_gen_files/bnProcPc/nrLDPC_bnProcPc_BG2_R%s_AVX2.h",ratestr[R]); snprintf(fname, sizeof(fname), "../ldpc_gen_files/bnProcPc/nrLDPC_bnProcPc_BG2_R%s_AVX2.h", ratestr[R]);
FILE *fd=fopen(fname,"w"); FILE *fd=fopen(fname,"w");
if (fd == NULL) {printf("Cannot create \n");abort();} if (fd == NULL) {
printf("Cannot create file %s\n", fname);
abort();
}
// fprintf(fd,"#include <stdint.h>\n"); // fprintf(fd,"#include <stdint.h>\n");
//fprintf(fd,"#include <immintrin.h>\n"); //fprintf(fd,"#include <immintrin.h>\n");
......
...@@ -15,10 +15,13 @@ void nrLDPC_bnProc_BG1_generator_AVX2(int R) ...@@ -15,10 +15,13 @@ void nrLDPC_bnProc_BG1_generator_AVX2(int R)
// system("mkdir -p ../ldpc_gen_files"); // system("mkdir -p ../ldpc_gen_files");
char fname[500]; char fname[FILENAME_MAX+1];
sprintf(fname,"../ldpc_gen_files/bnProc/nrLDPC_bnProc_BG1_R%s_AVX2.h",ratestr[R]); snprintf(fname, sizeof(fname), "../ldpc_gen_files/bnProc/nrLDPC_bnProc_BG1_R%s_AVX2.h", ratestr[R]);
FILE *fd=fopen(fname,"w"); FILE *fd=fopen(fname,"w");
if (fd == NULL) {printf("Cannot create \n");abort();} if (fd == NULL) {
printf("Cannot create file %s\n", fname);
abort();
}
//fprintf(fd,"#include <stdint.h>\n"); //fprintf(fd,"#include <stdint.h>\n");
//fprintf(fd,"#include <immintrin.h>\n"); //fprintf(fd,"#include <immintrin.h>\n");
......
...@@ -15,10 +15,13 @@ void nrLDPC_bnProc_BG2_generator_AVX2(int R) ...@@ -15,10 +15,13 @@ void nrLDPC_bnProc_BG2_generator_AVX2(int R)
// system("mkdir -p ../ldpc_gen_files"); // system("mkdir -p ../ldpc_gen_files");
char fname[150]; char fname[FILENAME_MAX+1];
sprintf(fname,"../ldpc_gen_files/bnProc/nrLDPC_bnProc_BG2_R%s_AVX2.h",ratestr[R]); snprintf(fname, sizeof(fname), "../ldpc_gen_files/bnProc/nrLDPC_bnProc_BG2_R%s_AVX2.h", ratestr[R]);
FILE *fd=fopen(fname,"w"); FILE *fd=fopen(fname,"w");
if (fd == NULL) {printf("Cannot create \n");abort();} if (fd == NULL) {
printf("Cannot create file %s\n", fname);
abort();
}
......
...@@ -15,10 +15,13 @@ void nrLDPC_bnProcPc_BG1_generator_AVX512(int R) ...@@ -15,10 +15,13 @@ void nrLDPC_bnProcPc_BG1_generator_AVX512(int R)
char fname[500]; char fname[FILENAME_MAX+1];
sprintf(fname,"../ldpc_gen_files/bnProcPc_avx512/nrLDPC_bnProcPc_BG1_R%s_AVX512.h",ratestr[R]); snprintf(fname, sizeof(fname), "../ldpc_gen_files/bnProcPc_avx512/nrLDPC_bnProcPc_BG1_R%s_AVX512.h", ratestr[R]);
FILE *fd=fopen(fname,"w"); FILE *fd=fopen(fname,"w");
if (fd == NULL) {printf("Cannot create %s\n",fname);abort();} if (fd == NULL) {
printf("Cannot create file %s\n", fname);
abort();
}
......
...@@ -15,10 +15,13 @@ void nrLDPC_bnProcPc_BG2_generator_AVX512(int R) ...@@ -15,10 +15,13 @@ void nrLDPC_bnProcPc_BG2_generator_AVX512(int R)
// system("mkdir -p ../ldpc_gen_files"); // system("mkdir -p ../ldpc_gen_files");
char fname[500]; char fname[FILENAME_MAX+1];
sprintf(fname,"../ldpc_gen_files/bnProcPc_avx512/nrLDPC_bnProcPc_BG2_R%s_AVX512.h",ratestr[R]); snprintf(fname, sizeof(fname), "../ldpc_gen_files/bnProcPc_avx512/nrLDPC_bnProcPc_BG2_R%s_AVX512.h", ratestr[R]);
FILE *fd=fopen(fname,"w"); FILE *fd=fopen(fname,"w");
if (fd == NULL) {printf("Cannot create %s\n",fname);abort();} if (fd == NULL) {
printf("Cannot create file %s\n", fname);
abort();
}
// fprintf(fd,"#include <stdint.h>\n"); // fprintf(fd,"#include <stdint.h>\n");
//fprintf(fd,"#include <immintrin.h>\n"); //fprintf(fd,"#include <immintrin.h>\n");
......
...@@ -15,10 +15,13 @@ void nrLDPC_bnProc_BG1_generator_AVX512(int R) ...@@ -15,10 +15,13 @@ void nrLDPC_bnProc_BG1_generator_AVX512(int R)
// system("mkdir -p ../ldpc_gen_files"); // system("mkdir -p ../ldpc_gen_files");
char fname[500]; char fname[FILENAME_MAX+1];
sprintf(fname,"../ldpc_gen_files/bnProc_avx512/nrLDPC_bnProc_BG1_R%s_AVX512.h",ratestr[R]); snprintf(fname, sizeof(fname), "../ldpc_gen_files/bnProc_avx512/nrLDPC_bnProc_BG1_R%s_AVX512.h", ratestr[R]);
FILE *fd=fopen(fname,"w"); FILE *fd=fopen(fname,"w");
if (fd == NULL) {printf("Cannot create %s\n",fname);abort();} if (fd == NULL) {
printf("Cannot create file %s\n", fname);
abort();
}
//fprintf(fd,"#include <stdint.h>\n"); //fprintf(fd,"#include <stdint.h>\n");
//fprintf(fd,"#include <immintrin.h>\n"); //fprintf(fd,"#include <immintrin.h>\n");
......
...@@ -15,10 +15,13 @@ void nrLDPC_bnProc_BG2_generator_AVX512(int R) ...@@ -15,10 +15,13 @@ void nrLDPC_bnProc_BG2_generator_AVX512(int R)
// system("mkdir -p ../ldpc_gen_files"); // system("mkdir -p ../ldpc_gen_files");
char fname[500]; char fname[FILENAME_MAX+1];
sprintf(fname,"../ldpc_gen_files/bnProc_avx512/nrLDPC_bnProc_BG2_R%s_AVX512.h",ratestr[R]); snprintf(fname, sizeof(fname), "../ldpc_gen_files/bnProc_avx512/nrLDPC_bnProc_BG2_R%s_AVX512.h", ratestr[R]);
FILE *fd=fopen(fname,"w"); FILE *fd=fopen(fname,"w");
if (fd == NULL) {printf("Cannot create %s\n",fname);abort();} if (fd == NULL) {
printf("Cannot create file %s\n", fname);
abort();
}
fprintf(fd,"#include <stdint.h>\n"); fprintf(fd,"#include <stdint.h>\n");
fprintf(fd,"#include <immintrin.h>\n"); fprintf(fd,"#include <immintrin.h>\n");
......
#include <stdio.h> #include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h>
#define NB_R 3 #define NB_R 3
void nrLDPC_bnProc_BG1_generator_AVX512(int); void nrLDPC_bnProc_BG1_generator_AVX512(int);
void nrLDPC_bnProc_BG2_generator_AVX512(int); void nrLDPC_bnProc_BG2_generator_AVX512(int);
......
#include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include "../../nrLDPCdecoder_defs.h" #include "../../nrLDPCdecoder_defs.h"
...@@ -11,10 +12,13 @@ void nrLDPC_cnProc_BG1_generator_AVX2(int R) ...@@ -11,10 +12,13 @@ void nrLDPC_cnProc_BG1_generator_AVX2(int R)
// system("mkdir -p ../ldpc_gen_files"); // system("mkdir -p ../ldpc_gen_files");
char fname[150]; char fname[FILENAME_MAX+1];
sprintf(fname,"../ldpc_gen_files/cnProc/nrLDPC_cnProc_BG1_R%s_AVX2.h",ratestr[R]); snprintf(fname, sizeof(fname), "../ldpc_gen_files/cnProc/nrLDPC_cnProc_BG1_R%s_AVX2.h", ratestr[R]);
FILE *fd=fopen(fname,"w"); FILE *fd=fopen(fname,"w");
if (fd == NULL) {printf("Cannot create \n");abort();} if (fd == NULL) {
printf("Cannot create file %s\n", fname);
abort();
}
fprintf(fd,"#include <stdint.h>\n"); fprintf(fd,"#include <stdint.h>\n");
fprintf(fd,"#include <immintrin.h>\n"); fprintf(fd,"#include <immintrin.h>\n");
......
...@@ -15,10 +15,13 @@ void nrLDPC_cnProc_BG2_generator_AVX2(int R) ...@@ -15,10 +15,13 @@ void nrLDPC_cnProc_BG2_generator_AVX2(int R)
// system("mkdir -p ldpc_gen_files/avx2"); // system("mkdir -p ldpc_gen_files/avx2");
char fname[500]; char fname[FILENAME_MAX+1];
sprintf(fname,"../ldpc_gen_files/cnProc/nrLDPC_cnProc_BG2_R%s_AVX2.h",ratestr[R]); snprintf(fname, sizeof(fname), "../ldpc_gen_files/cnProc/nrLDPC_cnProc_BG2_R%s_AVX2.h", ratestr[R]);
FILE *fd=fopen(fname,"w"); FILE *fd=fopen(fname,"w");
if (fd == NULL) {printf("Cannot create \n");abort();} if (fd == NULL) {
printf("Cannot create file %s\n", fname);
abort();
}
fprintf(fd,"#include <stdint.h>\n"); fprintf(fd,"#include <stdint.h>\n");
fprintf(fd,"#include <immintrin.h>\n"); fprintf(fd,"#include <immintrin.h>\n");
......
...@@ -12,10 +12,13 @@ void nrLDPC_cnProc_BG1_generator_AVX512(int R) ...@@ -12,10 +12,13 @@ void nrLDPC_cnProc_BG1_generator_AVX512(int R)
// system("mkdir -p ../ldpc_gen_files"); // system("mkdir -p ../ldpc_gen_files");
char fname[500]; char fname[FILENAME_MAX+1];
sprintf(fname,"../ldpc_gen_files/cnProc_avx512/nrLDPC_cnProc_BG1_R%s_AVX512.h",ratestr[R]); snprintf(fname, sizeof(fname), "../ldpc_gen_files/cnProc_avx512/nrLDPC_cnProc_BG1_R%s_AVX512.h", ratestr[R]);
FILE *fd=fopen(fname,"w"); FILE *fd=fopen(fname,"w");
if (fd == NULL) {printf("Cannot create \n");abort();} if (fd == NULL) {
printf("Cannot create file %s\n", fname);
abort();
}
// fprintf(fd,"#include <stdint.h>\n"); // fprintf(fd,"#include <stdint.h>\n");
// fprintf(fd,"#include <immintrin.h>\n"); // fprintf(fd,"#include <immintrin.h>\n");
......
#include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include "../../nrLDPCdecoder_defs.h" #include "../../nrLDPCdecoder_defs.h"
...@@ -13,10 +12,13 @@ void nrLDPC_cnProc_BG2_generator_AVX512(int R) ...@@ -13,10 +12,13 @@ void nrLDPC_cnProc_BG2_generator_AVX512(int R)
// system("mkdir -p ../ldpc_gen_files"); // system("mkdir -p ../ldpc_gen_files");
char fname[150]; char fname[FILENAME_MAX+1];
sprintf(fname,"../ldpc_gen_files/cnProc_avx512/nrLDPC_cnProc_BG2_R%s_AVX512.h",ratestr[R]); snprintf(fname, sizeof(fname), "../ldpc_gen_files/cnProc_avx512/nrLDPC_cnProc_BG2_R%s_AVX512.h", ratestr[R]);
FILE *fd=fopen(fname,"w"); FILE *fd=fopen(fname,"w");
if (fd == NULL) {printf("Cannot create \n");abort();} if (fd == NULL) {
printf("Cannot create file %s\n", fname);
abort();
}
//fprintf(fd,"#include <stdint.h>\n"); //fprintf(fd,"#include <stdint.h>\n");
// fprintf(fd,"#include <immintrin.h>\n"); // fprintf(fd,"#include <immintrin.h>\n");
......
rm -rf $OPENAIR_HOME/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files #!/bin/bash
mkdir $OPENAIR_HOME/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files $(
mkdir $OPENAIR_HOME/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/cnProc cd $OPENAIR_HOME/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools
mkdir $OPENAIR_HOME/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/cnProc_avx512 rm -rf ldpc_gen_files
mkdir $OPENAIR_HOME/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/bnProc mkdir ldpc_gen_files
mkdir $OPENAIR_HOME/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/bnProc_avx512 cd ldpc_gen_files
mkdir $OPENAIR_HOME/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/bnProcPc mkdir cnProc
mkdir $OPENAIR_HOME/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/bnProcPc_avx512 mkdir cnProc_avx512
cd $OPENAIR_HOME/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc; make;./bnProc_gen_avx2 mkdir bnProc
cd $OPENAIR_HOME/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_cnProc; make;./cnProc_gen_avx2 mkdir bnProc_avx512
cd $OPENAIR_HOME/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_bnProc_avx512;make;./bnProc_gen_avx512 mkdir bnProcPc
cd $OPENAIR_HOME/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_cnProc_avx512;make;./cnProc_gen_avx512 mkdir bnProcPc_avx512
cd ../generator_bnProc; make; make clean; ./bnProc_gen_avx2
cd ../generator_cnProc; make; make clean; ./cnProc_gen_avx2
cd ../generator_bnProc_avx512; make; make clean; ./bnProc_gen_avx512
cd ../generator_cnProc_avx512; make; make clean; ./cnProc_gen_avx512
)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment