Commit ae4bf02f authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: override setCorrIndicesTdData (JNA) -> tp_proc_set_corr_indices_td

Third JNA-mode gap on the CUAS oracle path: TDCorrTile.convertTDtoPD re-uploads
host-selected TD correlation tiles via GpuQuad.setCorrIndicesTdData, which was
not overridden -> base JCuda cuMemcpyHtoD on a null gpu_corr_indices -> NPE.

Adds the GpuQuadJna override (ensureRbgCorr() then delegate to the new native
tp_proc_set_corr_indices_td) + the TpJna binding. Gap-finder over the full CUAS
TD path (CuasMotion + TDCorrTile) confirms this was the LAST GPU-touching
un-overridden method; the rest are pure config getters.

Needs the matching tile_processor_gpu commit (native fn) + libtileproc.so
rebuild. mvn compile clean.
Co-Authored-By: 's avatarClaude Opus 4.8 (1M context) <noreply@anthropic.com>
parent b6a986ac
...@@ -342,6 +342,13 @@ public class GpuQuadJna extends GpuQuad { ...@@ -342,6 +342,13 @@ public class GpuQuadJna extends GpuQuad {
lib.tp_proc_get_corr_td(proc, out); lib.tp_proc_get_corr_td(proc, out);
return out; return out;
} }
// Re-upload host-built TD per-pair corr indices + data (inverse of getCorrIndices/getCorrTdData): the
// TD->PD re-conversion path (TDCorrTile.convertTDtoPD). Base does JCuda cuMemcpyHtoD into null buffers.
// ensureRbgCorr() guarantees the native corr buffers exist (idempotent). By Claude on 06/26/2026.
@Override public void setCorrIndicesTdData(int num_tiles, int[] corr_indices, float[] fdata) {
ensureRbgCorr();
lib.tp_proc_set_corr_indices_td(proc, corr_indices, fdata, num_tiles);
}
@Override public int[] getCorrComboIndices() { @Override public int[] getCorrComboIndices() {
int n = lib.tp_proc_num_corr_combo(proc); int n = lib.tp_proc_num_corr_combo(proc);
int[] out = new int[n]; int[] out = new int[n];
......
...@@ -103,6 +103,8 @@ public interface TpJna extends Library { ...@@ -103,6 +103,8 @@ public interface TpJna extends Library {
int tp_proc_get_corr_indices(Pointer proc, int[] out, int n); int tp_proc_get_corr_indices(Pointer proc, int[] out, int n);
int tp_proc_get_corr_combo_indices(Pointer proc, int[] out, int n); int tp_proc_get_corr_combo_indices(Pointer proc, int[] out, int n);
int tp_proc_get_corr_td(Pointer proc, float[] out); int tp_proc_get_corr_td(Pointer proc, float[] out);
/** Upload host-built TD per-pair corr indices + data (TD->PD re-conversion path). 0 on success. */
int tp_proc_set_corr_indices_td(Pointer proc, int[] corr_indices, float[] fdata, int num_tiles);
int tp_proc_erase_corrs(Pointer proc); int tp_proc_erase_corrs(Pointer proc);
// ---- oracle textures: textures_nonoverlap (DP) + readback (matches GpuQuad.execTextures_DP) ---- // ---- oracle textures: textures_nonoverlap (DP) + readback (matches GpuQuad.execTextures_DP) ----
/** textures_nonoverlap<<<1,1>>>: CDP-builds the index list + accumulate. params5={min_shot,scale_shot, /** textures_nonoverlap<<<1,1>>>: CDP-builds the index list + accumulate. params5={min_shot,scale_shot,
......
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