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
lizhongxiao
OpenXG-RAN
Commits
cdc60bd9
Commit
cdc60bd9
authored
Jun 11, 2020
by
WANG Tsu-Han
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes for compilation error in CUDA machine
parent
376baa32
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
4 deletions
+24
-4
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+23
-3
openair1/PHY/CODING/TESTBENCH/ldpctest.c
openair1/PHY/CODING/TESTBENCH/ldpctest.c
+1
-1
No files found.
cmake_targets/CMakeLists.txt
View file @
cdc60bd9
...
@@ -197,11 +197,19 @@ set(CMAKE_C_FLAGS
...
@@ -197,11 +197,19 @@ set(CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
C_FLAGS_PROCESSOR
}
-pipe -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC"
)
"
${
CMAKE_C_FLAGS
}
${
C_FLAGS_PROCESSOR
}
-pipe -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC"
)
# add autotools definitions that were maybe used!
# add autotools definitions that were maybe used!
if
(
CUDA_FOUND
)
if
(
CUDA_FOUND
)
set
(
MKVER
"'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'"
)
set
(
CUDA_CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D CUDA_FLAG"
)
set
(
CUDA_CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
C_FLAGS_PROCESSOR
}
-Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11 -D CUDA_FLAG"
)
set
(
CMAKE_C_FLAGS
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP "
"
${
CMAKE_C_FLAGS
}
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP
-D
${
MKVER
}
-D CUDA_FLAG
"
)
)
set
(
CMAKE_CXX_FLAGS
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
C_FLAGS_PROCESSOR
}
-Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11 "
"
${
CMAKE_CXX_FLAGS
}
${
C_FLAGS_PROCESSOR
}
-Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11
-D
${
MKVER
}
-D CUDA_FLAG
"
)
)
else
(
CUDA_FOUND
)
else
(
CUDA_FOUND
)
set
(
MKVER
"'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'"
)
set
(
MKVER
"'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'"
)
...
@@ -2836,10 +2844,19 @@ target_link_libraries(smallblocktest
...
@@ -2836,10 +2844,19 @@ target_link_libraries(smallblocktest
m pthread
${
ATLAS_LIBRARIES
}
dl
m pthread
${
ATLAS_LIBRARIES
}
dl
)
)
# temp_C_flag = CMAKE_C_FLAGS
#set(CMAKE_C_FLAGS " ")
set
(
TEMP_C_FLAG
${
CMAKE_C_FLAGS
}
)
set
(
CMAKE_C_FLAGS
${
CUDA_CMAKE_C_FLAGS
}
)
set
(
TEMP_CXX_FLAG
${
CMAKE_CXX_FLAGS
}
)
set
(
CMAKE_CXX_FLAGS
${
CUDA_CMAKE_CXX_FLAGS
}
)
if
(
CUDA_FOUND
)
if
(
CUDA_FOUND
)
###################################################
###################################################
# For CUDA library
# For CUDA library
###################################################
###################################################
CUDA_ADD_LIBRARY
(
LDPC_CU
CUDA_ADD_LIBRARY
(
LDPC_CU
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu
)
)
...
@@ -2865,6 +2882,9 @@ else (CUDA_FOUND)
...
@@ -2865,6 +2882,9 @@ else (CUDA_FOUND)
)
)
endif
()
endif
()
set
(
CMAKE_C_FLAGS
${
TEMP_C_FLAG
}
)
set
(
CMAKE_CXX_FLAGS
${
TEMP_CXX_FLAG
}
)
# add_executable(ldpctest
# add_executable(ldpctest
# ${PHY_NR_CODINGIF}
# ${PHY_NR_CODINGIF}
...
...
openair1/PHY/CODING/TESTBENCH/ldpctest.c
View file @
cdc60bd9
...
@@ -400,7 +400,7 @@ int test_ldpc(short No_iteration,
...
@@ -400,7 +400,7 @@ 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__
#ifdef
CUDA_FLAG
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
);
...
...
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