Skip to content

Commit f0d9fe3

Browse files
committed
prepare for publish
1 parent 1a5e28a commit f0d9fe3

File tree

5 files changed

+75
-0
lines changed

5 files changed

+75
-0
lines changed

cmake/Modules/FindOPENCL.cmake

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# For OpenCL LTE Scanner (https://github.com/JiaoXianjun/LTE-Cell-Scanner)
2+
# Jiao Xianjun ([email protected])
3+
14
# - Find OpenCL
25
# Find the native OpenCL includes and library
36
# This module defines
@@ -26,6 +29,7 @@ IF (OPENCL_LIBRARY AND OPENCL_INCLUDE_DIR)
2629
SET(OPENCL_FOUND "YES")
2730
ELSE (OPENCL_LIBRARY AND OPENCL_INCLUDE_DIR)
2831
SET(OPENCL_FOUND "NO")
32+
MESSAGE(STATUS "OPENCL not found.")
2933
ENDIF (OPENCL_LIBRARY AND OPENCL_INCLUDE_DIR)
3034

3135
IF (OPENCL_FOUND)

include/filter_coef.h

+21
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
1+
// An OpenCL accelerated LTE Cell Scanner
2+
//
3+
// Written by Jiao Xianjun <[email protected]>
4+
//
5+
// This program is free software: you can redistribute it and/or modify
6+
// it under the terms of the GNU Affero General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// This program is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU Affero General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU Affero General Public License
16+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
18+
// Header file to store coefficients of FIR 6RB channel filter
19+
120
#ifndef HAVE_FILTER_COEF_H
221
#define HAVE_FILTER_COEF_H
322

23+
// filter coefficients
24+
// This is for non-OpenCL version. You should change coefficients in OpenCL kernel files for OpenCL version
425
const float chn_6RB_filter_coef[47] = { \
526
8.193313185354206e-04, 3.535548569572820e-04, -1.453429245341695e-03, 1.042805860697287e-03, 1.264224526451337e-03, \
627
-3.219586065044259e-03, 1.423981657254563e-03, 3.859884310477692e-03, -6.552708013395765e-03, 8.590509694961493e-04, \

src/filter_mchn_kernels.cl

+20
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
// An OpenCL accelerated LTE Cell Scanner
2+
//
3+
// Written by Jiao Xianjun <[email protected]>
4+
//
5+
// This program is free software: you can redistribute it and/or modify
6+
// it under the terms of the GNU Affero General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// This program is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU Affero General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU Affero General Public License
16+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
18+
// kernels for multi channels PSS correlation
19+
// !!!This file should be put into $PATH directory or any other location where program can discover in runtime!!!
20+
121
__kernel void skip2cols( __global float2* in,
222
__global float2* out,
323
uint len_in)

src/filter_my_kernels.cl

+21
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
// An OpenCL accelerated LTE Cell Scanner
2+
//
3+
// Written by Jiao Xianjun <[email protected]>
4+
//
5+
// This program is free software: you can redistribute it and/or modify
6+
// it under the terms of the GNU Affero General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// This program is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU Affero General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU Affero General Public License
16+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
18+
// kernels for FIR 6RB channel filter.
19+
// !!!This file should be put into $PATH directory or any other location where program can discover in runtime!!!
20+
21+
// filter coefficients
122
constant float chn_6RB_filter_coef[47] = { \
223
8.193313185354206e-04, 3.535548569572820e-04, -1.453429245341695e-03, 1.042805860697287e-03, 1.264224526451337e-03, \
324
-3.219586065044259e-03, 1.423981657254563e-03, 3.859884310477692e-03, -6.552708013395765e-03, 8.590509694961493e-04, \

tmp.txt

+9
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,16 @@ twist mode i7-3930K CPU @ 3.20GHz
4040
0.008s
4141

4242
non-twist mode NO OPENCL: 6RB filter cost 0.0809879s PSS xcorr cost 7.08098s
43+
twist mode NO OPENCL: 6RB filter cost 0.0809879s PSS xcorr cost 26s
4344

45+
-----------------i5 CPU M 520 @ 2.40GHz + POCL--------------------
46+
6RB filter 0.008
47+
xcorr-workitem=2
48+
2.4s
49+
xcorr-workitem=4
50+
2.38s
51+
xcorr-workitem=8
52+
2.41s
4453

4554
./CellSearch --loadbin ~/git/rtl-sdr-LTE/scan-capture/frequency-1850-1880MHz/f1860_s1.92_g0_1s_strong.bin --num-reserve=4
4655
should be like:

0 commit comments

Comments
 (0)