• Andrey Filippov's avatar
    CLAUDE: clt_average_sensors v1 chain - MB-aware indexing + OOB priority + masked average · 18976ef3
    Andrey Filippov authored
    Three kernels (tp_consolidate.cu, oracle = imagej-elphel CuasTD @eab1660e):
    - index_consolidate: index_direct successor aware of the motion-blur task
      pair (gpu_ftasks1 may be NULL = no-MB, mirrors Java TpTask[2][] with [1]
      null); keeps tiles active in BOTH sets, txy-alignment verified
      (misaligned counted, skipped); output = compacted even/odd PAIRS (no-MB:
      odd = copy) so pass 2 is uniform. Activity tested on the task word as
      int (v0 index_direct float-compare -0.0 quirk noted).
    - consolidate_oob: frozen 2c spec - per sensor depth = min over the MB
      pair of tile-center distance to nearest frame edge; <hard(8) always
      skipped, any >=soft(12) only those, else hard survivors last resort,
      nobody -> tile dropped; NaN xy excluded (explicit isnan - fminf would
      silently ignore NaN); mask folded into task bits TASK_AVG_SENS_SHIFT=11
      (bits 11+ virgin per the TpTask bit-field survey).
    - clt_average_sensors_list: v0 core driven by the compacted list, gated
      by the mask; host prefills NaN/0 = oracle poison semantics.
    v0 clt_average_sensors refactored onto the shared consolidate_chunk core
    (all-ones mask), verified bit-exact.
    
    test_avg_td_oob: loads AvgTdExport.exportOob cases (raw ftasks0/1
    streams); runs the chain; compares masks exactly + td_avg/counts at tol 0.
    make_avg_td_oob_case.py: synthetic 4-sensor case = the SAME scenario the
    Java oracle self-test passes (every OOB branch); independent float32
    oracle-op-order expectations.
    VERIFIED: synth avg_td (v0 refactor) max|diff|=0; synth avg_td_oob chain
    5 pairs -> 4 tiles, masks exact, avg/counts max|diff|=0 at tol 0;
    test_convert_direct regression PASS both tiers.
    Co-Authored-By: 's avatarClaude Fable 5 <noreply@anthropic.com>
    18976ef3
test_avg_td_oob.cu 7.68 KB