Commit dc090454 authored by Andrey Filippov's avatar Andrey Filippov

More refactoring

parent 67816dbf
......@@ -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(
......
This diff is collapsed.
......@@ -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);
};
......
......@@ -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;
}
......@@ -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 kernels_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;
......
......@@ -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);
......
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