Commit 50630abc authored by Andrey Filippov's avatar Andrey Filippov

adding code for debug info for GPU geometric corrections

parent 6961660a
...@@ -146,6 +146,9 @@ public class GPUTileProcessor { ...@@ -146,6 +146,9 @@ public class GPUTileProcessor {
public static int THREADS_DYNAMIC_BITS = 5; // treads in block for CDP creation of the texture list public static int THREADS_DYNAMIC_BITS = 5; // treads in block for CDP creation of the texture list
public static int RBYRDIST_LEN = 5001; //for double, 10001 - float; // length of rByRDist to allocate shared memory
public static double RBYRDIST_STEP = 0.0004; // for double, 0.0002 - for float; // to fit into GPU shared memory (was 0.001);
public static int TILES_PER_BLOCK_GEOM = 32; // blockDim.x = NUM_CAMS; blockDim.x = TILES_PER_BLOCK_GEOM
public static int TASK_TEXTURE_BITS = ((1 << TASK_TEXTURE_N_BIT) | (1 << TASK_TEXTURE_E_BIT) | (1 << TASK_TEXTURE_S_BIT) | (1 << TASK_TEXTURE_W_BIT)); public static int TASK_TEXTURE_BITS = ((1 << TASK_TEXTURE_N_BIT) | (1 << TASK_TEXTURE_E_BIT) | (1 << TASK_TEXTURE_S_BIT) | (1 << TASK_TEXTURE_W_BIT));
...@@ -344,7 +347,11 @@ public class GPUTileProcessor { ...@@ -344,7 +347,11 @@ public class GPUTileProcessor {
"#define LIST_TEXTURE_BIT " + LIST_TEXTURE_BIT+"\n"+ "#define LIST_TEXTURE_BIT " + LIST_TEXTURE_BIT+"\n"+
"#define CORR_OUT_RAD " + CORR_OUT_RAD+"\n" + "#define CORR_OUT_RAD " + CORR_OUT_RAD+"\n" +
"#define FAT_ZERO_WEIGHT " + FAT_ZERO_WEIGHT+"\n"+ "#define FAT_ZERO_WEIGHT " + FAT_ZERO_WEIGHT+"\n"+
"#define THREADS_DYNAMIC_BITS " + THREADS_DYNAMIC_BITS+"\n"; "#define THREADS_DYNAMIC_BITS " + THREADS_DYNAMIC_BITS+"\n"+
"#define RBYRDIST_LEN " + RBYRDIST_LEN+"\n"+
"#define RBYRDIST_STEP " + RBYRDIST_STEP+"\n"+
"#define TILES_PER_BLOCK_GEOM " + TILES_PER_BLOCK_GEOM+"\n";
} }
......
...@@ -4798,7 +4798,7 @@ public class ImageDtt { ...@@ -4798,7 +4798,7 @@ public class ImageDtt {
final int tilesY=dct_data.length; final int tilesY=dct_data.length;
final int tilesX=dct_data[0].length; final int tilesX=dct_data[0].length;
@SuppressWarnings("unused") @SuppressWarnings("unused")
final double [][] dbg_tile = dct_data[debug_tileY][debug_tileX]; final double [][] dbg_tile = ((debug_tileY >=0) && (debug_tileX >=0))? dct_data[debug_tileY][debug_tileX]:null;
// final int width= (tilesX+1)*dct_size; // final int width= (tilesX+1)*dct_size;
// final int height= (tilesY+1)*dct_size; // final int height= (tilesY+1)*dct_size;
......
...@@ -1508,10 +1508,20 @@ public class TwoQuadCLT { ...@@ -1508,10 +1508,20 @@ public class TwoQuadCLT {
try { try {
quadCLT_main.getGeometryCorrection().saveFloatsGPU(kernel_dir +"main"); quadCLT_main.getGeometryCorrection().saveFloatsGPU(kernel_dir +"main");
} catch (IOException e) { } catch (IOException e) {
System.out.println("Failed to save geometry correction data to "+kernel_dir); System.out.println("Failed to save geometry correction data (float) to "+kernel_dir);
e.printStackTrace(); e.printStackTrace();
} }
try {
quadCLT_main.getGeometryCorrection().saveDoublesGPU(kernel_dir +"main");
} catch (IOException e) {
System.out.println("Failed to save geometry correction data (double) to "+kernel_dir);
e.printStackTrace();
}
quadCLT_main.getGeometryCorrection().getCorrVector().getRotMatricesDbg();
quadCLT_main.getGeometryCorrection().getCorrVector().getRotDeriveMatricesDbg();
if (debugLevel < -1000) { if (debugLevel < -1000) {
return null; return null;
} }
......
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