Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tile_processor_gpu
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
tile_processor_gpu
Commits
dc090454
Commit
dc090454
authored
Apr 07, 2025
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More refactoring
parent
67816dbf
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
248 additions
and
32 deletions
+248
-32
TileProcessor.h
src/TileProcessor.h
+1
-1
TpHostGpu.cu
src/TpHostGpu.cu
+223
-22
TpHostGpu.h
src/TpHostGpu.h
+19
-6
TpParams.cu
src/TpParams.cu
+1
-1
TpParams.h
src/TpParams.h
+2
-2
test_tp.cu
src/test_tp.cu
+2
-0
No files found.
src/TileProcessor.h
View file @
dc090454
...
...
@@ -126,7 +126,7 @@ extern "C" __global__ void correlate2D_inter( // only results in TD
int
*
gpu_corr_indices
,
// packed tile+pair
int
*
pnum_corr_tiles
,
// pointer to a number of correlation tiles to process
size_t
corr_stride
,
// in floats
float
*
gpu_corrs
);
// correlation output data
float
*
gpu_corrs
);
// correlation output data
extern
"C"
__global__
void
corr2D_normalize
(
...
...
src/TpHostGpu.cu
View file @
dc090454
This diff is collapsed.
Click to expand it.
src/TpHostGpu.h
View file @
dc090454
...
...
@@ -115,20 +115,32 @@ public:
void
setCltBuffers
();
void
setCorrImgBuffers
();
void
setImgBuffers
();
void
setImgBuffersShifted
(
int
is_bayer
,
int
image_dx
,
int
image_dy
);
void
setGeometryCorrectionBuffers
();
void
setCorrelationBuffers
();
void
setTasks
(
const
float
target_disparity
,
const
float
scale
);
void
setTextures
();
void
setRGBA
();
void
testCorrelate2DIntra
(
int
num_runs
);
void
testRotMatrices
(
int
num_runs
);
// 424
void
testReverseDistortions
(
int
num_runs
);
// 468
void
testGeomCorrect
(
int
num_runs
);
// 534
void
testConvertDirect
(
int
num_runs
);
// 608
void
testImclt
(
int
num_runs
);
// 682
void
testImcltRbgAll
(
int
num_runs
);
// 701
void
testCorrelate2DIntra
(
int
num_runs
);
void
testCorrelate2DInterSelf
(
int
num_runs
);
// for both intra and inter!
void
saveIntraCorrFile
(
const
char
*
path
,
const
char
*
prompt
,
int
num_corrs
,
float
*
gpu_corrs
,
int
*
gpu_corr_indices
,
int
num_sel_sensors
);
void
saveInterCorrFile
(
const
char
*
path
,
const
char
*
prompt
,
int
num_corrs
,
float
*
gpu_corrs_td
,
int
*
gpu_corr_indices
,
int
num_sel_sensors
);
void
saveInterCorrIndicesFile
(
const
char
*
path
,
const
char
*
prompt
,
int
*
gpu_corr_indices
,
int
num_sel_sensors
);
void
saveIntraCorrFile
(
const
char
*
path
,
const
char
*
prompt
,
int
num_corrs
,
int
num_corr_indices
,
float
*
gpu_corrs
,
int
*
gpu_corr_indices
,
int
num_sel_sensors
);
void
saveInterCorrFile
(
const
char
*
path
,
const
char
*
prompt
,
int
num_corrs
,
int
num_corr_indices
,
float
*
gpu_corrs_td
,
int
*
gpu_corr_indices
,
int
num_sel_sensors
);
void
saveInterCorrIndicesFile
(
const
char
*
path
,
const
char
*
prompt
,
int
num_corr_indices
,
int
*
gpu_corr_indices
,
int
num_sel_sensors
);
private
:
float
*
getCorrImg
(
int
corr_img_size
,
int
*
cpu_corr_indices
,
float
*
cpu_corr
,
int
num_sel_sensors
);
float
*
getCorrTdImg
(
int
corr_img_size
,
int
*
cpu_corr_indices
,
float
*
cpu_corr_td
,
int
num_sel_sensors
);
float
*
getCorrImg
(
int
corr_img_size
,
int
num_corr_indices
,
int
*
cpu_corr_indices
,
float
*
cpu_corr
,
int
num_sel_sensors
);
float
*
getCorrTdImg
(
int
corr_img_size
,
int
num_corr_indices
,
int
*
cpu_corr_indices
,
float
*
cpu_corr_td
,
int
num_sel_sensors
);
void
hfree
(
float
*
p
);
// {if (p) free (p);}
void
hfree
(
struct
CltExtra
*
p
);
void
gfree
(
float
*
p
);
...
...
@@ -138,6 +150,7 @@ private:
void
gfree
(
struct
gc
*
p
);
void
gfree
(
struct
corr_vector
*
p
);
void
gfree
(
struct
trot_deriv
*
p
);
void
gfree
(
float
**
p
);
};
...
...
src/TpParams.cu
View file @
dc090454
...
...
@@ -39,7 +39,7 @@ TpParams::TpParams(int lwir){
corr_size = 2 * corr_out_rad + 1;
corr_length = corr_size * corr_size;
num_tiles = tp_tasks_size;
num_corr_indices = num_pairs * num_tiles;
//
num_corr_indices = num_pairs * num_tiles;
}
src/TpParams.h
View file @
dc090454
...
...
@@ -22,7 +22,7 @@ public:
static
constexpr
int
img_width
=
IMG_WIDTH
;
static
constexpr
int
img_height
=
IMG_HEIGHT
;
static
constexpr
int
kernels_hor
=
KERNELS_HOR
;
static
constexpr
int
kernel
_vert
=
KERNELS_VERT
;
static
constexpr
int
kernel
s_vert
=
KERNELS_VERT
;
static
constexpr
int
task_inter_en
=
TASK_INTER_EN
;
// 10 // Task bit to enable interscene correlation
static
constexpr
int
task_corr_en
=
TASK_CORR_EN
;
// 9 // Task bit to enable intrascene correlation (pairs defined separately)
...
...
@@ -90,7 +90,7 @@ public:
int
num_tiles
{};
int
corr_size
{};
int
corr_length
{};
int
num_corr_indices
{};
// int num_corr_indices{}; // removing - different length for intra/inter
// std::vector<float[2]> m_port_offsets;
...
...
src/test_tp.cu
View file @
dc090454
...
...
@@ -463,6 +463,8 @@ int main(int argc, char **argv)
#endif // TEST_ROT_MATRICES
#define TEST_REVERSE_DISTORTIONS
#ifdef TEST_REVERSE_DISTORTIONS
dim3 threads_rd(3,3,3);
...
...
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