Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
imagej-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
imagej-elphel
Commits
6254f686
Commit
6254f686
authored
Mar 12, 2020
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated gpu kernel
parent
473bf75a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
8 deletions
+64
-8
TileProcessor.cuh
src/main/resources/TileProcessor.cuh
+64
-8
No files found.
src/main/resources/TileProcessor.cuh
View file @
6254f686
...
@@ -325,6 +325,16 @@ __constant__ float lpf_data[3][64]={
...
@@ -325,6 +325,16 @@ __constant__ float lpf_data[3][64]={
0.05616371
f
,
0.04888546
f
,
0.03703642
f
,
0.02442406
f
,
0.01402412
f
,
0.00703062
f
,
0.00315436
f
,
0.00153247
f
,
0.05616371
f
,
0.04888546
f
,
0.03703642
f
,
0.02442406
f
,
0.01402412
f
,
0.00703062
f
,
0.00315436
f
,
0.00153247
f
,
0.02728573
f
,
0.02374977
f
,
0.01799322
f
,
0.01186582
f
,
0.00681327
f
,
0.00341565
f
,
0.00153247
f
,
0.00074451
f
0.02728573
f
,
0.02374977
f
,
0.01799322
f
,
0.01186582
f
,
0.00681327
f
,
0.00341565
f
,
0.00153247
f
,
0.00074451
f
}};
}};
__constant__
float
lpf_rb_corr
[
64
]
=
{
// modify if needed
1.00000000
f
,
0.92598908
f
,
0.79428680
f
,
0.63198650
f
,
0.46862740
f
,
0.32891038
f
,
0.22914618
f
,
0.17771927
f
,
0.92598908
f
,
0.85745578
f
,
0.73550091
f
,
0.58521260
f
,
0.43394386
f
,
0.30456742
f
,
0.21218686
f
,
0.16456610
f
,
0.79428680
f
,
0.73550091
f
,
0.63089153
f
,
0.50197854
f
,
0.37222456
f
,
0.26124917
f
,
0.18200779
f
,
0.14116007
f
,
0.63198650
f
,
0.58521260
f
,
0.50197854
f
,
0.39940694
f
,
0.29616619
f
,
0.20786692
f
,
0.14481729
f
,
0.11231618
f
,
0.46862740
f
,
0.43394386
f
,
0.37222456
f
,
0.29616619
f
,
0.21961164
f
,
0.15413642
f
,
0.10738418
f
,
0.08328412
f
,
0.32891038
f
,
0.30456742
f
,
0.26124917
f
,
0.20786692
f
,
0.15413642
f
,
0.10818204
f
,
0.07536856
f
,
0.05845371
f
,
0.22914618
f
,
0.21218686
f
,
0.18200779
f
,
0.14481729
f
,
0.10738418
f
,
0.07536856
f
,
0.05250797
f
,
0.04072369
f
,
0.17771927
f
,
0.16456610
f
,
0.14116007
f
,
0.11231618
f
,
0.08328412
f
,
0.05845371
f
,
0.04072369
f
,
0.03158414
f
};
__constant__
float
lpf_corr
[
64
]
=
{
// modify if needed
__constant__
float
lpf_corr
[
64
]
=
{
// modify if needed
1.00000000
f
,
0.87041007
f
,
0.65943687
f
,
0.43487258
f
,
0.24970076
f
,
0.12518080
f
,
0.05616371
f
,
0.02728573
f
,
1.00000000
f
,
0.87041007
f
,
0.65943687
f
,
0.43487258
f
,
0.24970076
f
,
0.12518080
f
,
0.05616371
f
,
0.02728573
f
,
0.87041007
f
,
0.75761368
f
,
0.57398049
f
,
0.37851747
f
,
0.21734206
f
,
0.10895863
f
,
0.04888546
f
,
0.02374977
f
,
0.87041007
f
,
0.75761368
f
,
0.57398049
f
,
0.37851747
f
,
0.21734206
f
,
0.10895863
f
,
0.04888546
f
,
0.02374977
f
,
...
@@ -512,7 +522,53 @@ __global__ void correlate2D(
...
@@ -512,7 +522,53 @@ __global__ void correlate2D(
__syncthreads
();
// __syncwarp();
__syncthreads
();
// __syncwarp();
#endif
#endif
#endif
#endif
if
(
color
==
1
){
// LPF only after B (nothing in mono)
#ifdef DBG_TILE
#ifdef DEBUG6
if
((
tile_num
==
DBG_TILE
)
&&
(
corr_pair
==
0
)
&&
(
threadIdx
.
x
==
0
)){
printf
(
"
\n
correlate2D LPF for RB correlation
\n
"
);
debug_print_lpf
(
lpf_rb_corr
);
}
__syncthreads
();
// __syncwarp();
#endif
#endif
float
*
clt
=
clt_corr
+
threadIdx
.
x
;
#pragma unroll
for
(
int
q
=
0
;
q
<
4
;
q
++
){
float
*
lpf_rb
=
lpf_rb_corr
+
threadIdx
.
x
;
#pragma unroll
for
(
int
i
=
0
;
i
<
DTT_SIZE
;
i
++
){
(
*
clt
)
*=
(
*
lpf_rb
);
clt
+=
DTT_SIZE1
;
lpf_rb
+=
DTT_SIZE
;
}
}
__syncthreads
();
// __syncwarp();
#ifdef DBG_TILE
#ifdef DEBUG6
if
((
tile_num
==
DBG_TILE
)
&&
(
corr_pair
==
0
)
&&
(
threadIdx
.
x
==
0
)){
printf
(
"
\n
correlate2D CORRELATION RB LPF-ed
\n
"
);
debug_print_clt1
(
clt_corr
,
-
1
,
0xf
);
}
}
__syncthreads
();
// __syncwarp();
#endif
#endif
}
// if (color == 1){ // LPF only after B (nothing in mono)
}
// for (int color = 0; color < colors; color++){
normalizeTileAmplitude
(
normalizeTileAmplitude
(
clt_corr
,
// float * clt_tile, // [4][DTT_SIZE][DTT_SIZE1], // +1 to alternate column ports
clt_corr
,
// float * clt_tile, // [4][DTT_SIZE][DTT_SIZE1], // +1 to alternate column ports
fat_zero
);
// float fat_zero ) // fat zero is absolute, scale it outside
fat_zero
);
// float fat_zero ) // fat zero is absolute, scale it outside
...
@@ -614,7 +670,7 @@ Java code:
...
@@ -614,7 +670,7 @@ Java code:
#ifdef DBG_TILE
#ifdef DBG_TILE
#ifdef DEBUG6
#ifdef DEBUG6
if
((
tile_num
==
DBG_TILE
)
&&
(
corr_pair
==
0
)
&&
(
threadIdx
.
x
==
0
)){
if
((
tile_num
==
DBG_TILE
)
&&
(
corr_pair
==
0
)
&&
(
threadIdx
.
x
==
0
)){
printf
(
"
\n
correlate2D after UNFOL, corr_radius=%d
\n
"
,
corr_radius
);
printf
(
"
\n
correlate2D after UNFOL
D
, corr_radius=%d
\n
"
,
corr_radius
);
debug_print_corr_15x15
(
debug_print_corr_15x15
(
corr_radius
,
// int corr_radius,
corr_radius
,
// int corr_radius,
mclt_corr
,
mclt_corr
,
...
...
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