Loading src/TileProcessor.cuh +383 −409 File changed.Preview size limit exceeded, changes collapsed. Show changes src/test_tp.cu +4 −3 Original line number Diff line number Diff line Loading @@ -1108,7 +1108,8 @@ int main(int argc, char **argv) for (int tx = 0; tx < TILESX; tx++){ int nt = ty * TILESX + tx; // int task_task = 0xf | (((1 << NUM_PAIRS)-1) << TASK_CORR_BITS); int task_task = 0xf | (1 << TASK_CORR_BITS); // just 1 bit, correlation selection is defined by common corr_sel bits // int task_task = 0xf | (1 << TASK_CORR_BITS); // just 1 bit, correlation selection is defined by common corr_sel bits int task_task = (1 << TASK_INTER_EN) | (1 << TASK_CORR_EN) | (1 << TASK_TEXT_EN); // just 1 bit, correlation selection is defined by common corr_sel bits int task_txy = tx + (ty << 16); float task_target_disparity = DBG_DISPARITY; float * tp = ftask_data + task_size * nt; Loading Loading @@ -1142,7 +1143,7 @@ int main(int argc, char **argv) float *tp = ftask_data + task_size * nt; int cm = (*(int *) tp) & TASK_TEXTURE_BITS; // non-zero any of 4 lower task bits if (cm){ texture_indices[num_textures++] = (nt << CORR_NTILE_SHIFT) | (1 << LIST_TEXTURE_BIT); // setting 0x80 in texture indices texture_indices[num_textures++] = (nt << TEXT_NTILE_SHIFT) | (1 << LIST_TEXTURE_BIT); // setting 0x80 in texture indices } } } Loading Loading @@ -2385,7 +2386,7 @@ int main(int argc, char **argv) non_overlap_layers[i] = NAN; } for (int itile = 0; itile < cpu_pnum_texture_tiles; itile++) { // if (texture_indices[itile] & ((1 << LIST_TEXTURE_BIT))){ int ntile = texture_indices[itile] >> CORR_NTILE_SHIFT; int ntile = texture_indices[itile] >> TEXT_NTILE_SHIFT; int tileX = ntile % TILESX; int tileY = ntile / TILESX; for (int ilayer = 0; ilayer < tile_texture_layers; ilayer++){ Loading src/tp_defines.h +20 −5 Original line number Diff line number Diff line Loading @@ -63,11 +63,26 @@ // only lower bit will be used to request correlations, correlation mask will be common for all the scene //#define CORR_PAIRS_MASK 0x3f// lower bits used to address correlation pair for the selected tile //#define CORR_TEXTURE_BIT 7 // bit 7 used to request texture for the tile #define TASK_CORR_BITS 4 #define TASK_TEXTURE_N_BIT 0 // Texture with North neighbor #define TASK_TEXTURE_E_BIT 1 // Texture with East neighbor #define TASK_TEXTURE_S_BIT 2 // Texture with South neighbor #define TASK_TEXTURE_W_BIT 3 // Texture with West neighbor //#define TASK_CORR_BITS 4 // REMOVE!!! // will be temporary disabled - too many references in Java code. Any task != 0 will be OK #define TASK_INTER_EN 10 // Task bit to enable interscene correlation #define TASK_CORR_EN 9 // Task bit to enable intrascene correlation (pairs defined separately) #define TASK_TEXT_EN 8 // task bit to enable texture generation #define TASK_TEXT_N_BIT 0 // Texture with North neighbor #define TASK_TEXT_NE_BIT 1 // Texture with North-East neighbor #define TASK_TEXT_E_BIT 2 // Texture with East neighbor #define TASK_TEXT_SE_BIT 3 // Texture with South-East neighbor #define TASK_TEXT_S_BIT 4 // Texture with South neighbor #define TASK_TEXT_SW_BIT 5 // Texture with South-West neighbor #define TASK_TEXT_W_BIT 6 // Texture with West neighbor #define TASK_TEXT_NW_BIT 7 // Texture with North-West neighbor //#define TASK_TEXTURE_N_BIT 0 // Texture with North neighbor //#define TASK_TEXTURE_E_BIT 1 // Texture with East neighbor //#define TASK_TEXTURE_S_BIT 2 // Texture with South neighbor //#define TASK_TEXTURE_W_BIT 3 // Texture with West neighbor #define LIST_TEXTURE_BIT 8 // 7 // bit to request texture calculation #define TEXT_NTILE_SHIFT 9 // 8 // tile number shift for texture calculation (will be different from CORR_NTILE_SHIFT!) Loading Loading
src/TileProcessor.cuh +383 −409 File changed.Preview size limit exceeded, changes collapsed. Show changes
src/test_tp.cu +4 −3 Original line number Diff line number Diff line Loading @@ -1108,7 +1108,8 @@ int main(int argc, char **argv) for (int tx = 0; tx < TILESX; tx++){ int nt = ty * TILESX + tx; // int task_task = 0xf | (((1 << NUM_PAIRS)-1) << TASK_CORR_BITS); int task_task = 0xf | (1 << TASK_CORR_BITS); // just 1 bit, correlation selection is defined by common corr_sel bits // int task_task = 0xf | (1 << TASK_CORR_BITS); // just 1 bit, correlation selection is defined by common corr_sel bits int task_task = (1 << TASK_INTER_EN) | (1 << TASK_CORR_EN) | (1 << TASK_TEXT_EN); // just 1 bit, correlation selection is defined by common corr_sel bits int task_txy = tx + (ty << 16); float task_target_disparity = DBG_DISPARITY; float * tp = ftask_data + task_size * nt; Loading Loading @@ -1142,7 +1143,7 @@ int main(int argc, char **argv) float *tp = ftask_data + task_size * nt; int cm = (*(int *) tp) & TASK_TEXTURE_BITS; // non-zero any of 4 lower task bits if (cm){ texture_indices[num_textures++] = (nt << CORR_NTILE_SHIFT) | (1 << LIST_TEXTURE_BIT); // setting 0x80 in texture indices texture_indices[num_textures++] = (nt << TEXT_NTILE_SHIFT) | (1 << LIST_TEXTURE_BIT); // setting 0x80 in texture indices } } } Loading Loading @@ -2385,7 +2386,7 @@ int main(int argc, char **argv) non_overlap_layers[i] = NAN; } for (int itile = 0; itile < cpu_pnum_texture_tiles; itile++) { // if (texture_indices[itile] & ((1 << LIST_TEXTURE_BIT))){ int ntile = texture_indices[itile] >> CORR_NTILE_SHIFT; int ntile = texture_indices[itile] >> TEXT_NTILE_SHIFT; int tileX = ntile % TILESX; int tileY = ntile / TILESX; for (int ilayer = 0; ilayer < tile_texture_layers; ilayer++){ Loading
src/tp_defines.h +20 −5 Original line number Diff line number Diff line Loading @@ -63,11 +63,26 @@ // only lower bit will be used to request correlations, correlation mask will be common for all the scene //#define CORR_PAIRS_MASK 0x3f// lower bits used to address correlation pair for the selected tile //#define CORR_TEXTURE_BIT 7 // bit 7 used to request texture for the tile #define TASK_CORR_BITS 4 #define TASK_TEXTURE_N_BIT 0 // Texture with North neighbor #define TASK_TEXTURE_E_BIT 1 // Texture with East neighbor #define TASK_TEXTURE_S_BIT 2 // Texture with South neighbor #define TASK_TEXTURE_W_BIT 3 // Texture with West neighbor //#define TASK_CORR_BITS 4 // REMOVE!!! // will be temporary disabled - too many references in Java code. Any task != 0 will be OK #define TASK_INTER_EN 10 // Task bit to enable interscene correlation #define TASK_CORR_EN 9 // Task bit to enable intrascene correlation (pairs defined separately) #define TASK_TEXT_EN 8 // task bit to enable texture generation #define TASK_TEXT_N_BIT 0 // Texture with North neighbor #define TASK_TEXT_NE_BIT 1 // Texture with North-East neighbor #define TASK_TEXT_E_BIT 2 // Texture with East neighbor #define TASK_TEXT_SE_BIT 3 // Texture with South-East neighbor #define TASK_TEXT_S_BIT 4 // Texture with South neighbor #define TASK_TEXT_SW_BIT 5 // Texture with South-West neighbor #define TASK_TEXT_W_BIT 6 // Texture with West neighbor #define TASK_TEXT_NW_BIT 7 // Texture with North-West neighbor //#define TASK_TEXTURE_N_BIT 0 // Texture with North neighbor //#define TASK_TEXTURE_E_BIT 1 // Texture with East neighbor //#define TASK_TEXTURE_S_BIT 2 // Texture with South neighbor //#define TASK_TEXTURE_W_BIT 3 // Texture with West neighbor #define LIST_TEXTURE_BIT 8 // 7 // bit to request texture calculation #define TEXT_NTILE_SHIFT 9 // 8 // tile number shift for texture calculation (will be different from CORR_NTILE_SHIFT!) Loading