Commit 53599fd3 authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: tp_proc_get_tasks — DtoH readback of gpu_ftasks (for updateTasks)

Co-Authored-By: 's avatarClaude Opus 4.8 (1M context) <noreply@anthropic.com>
parent 87796b0c
......@@ -656,6 +656,9 @@ int tp_proc_set_center_image(TpProc* p, const float* d){ if(!p)return -1; cuCtxS
int tp_proc_set_tasks(TpProc* p, const float* ftasks, int ntiles, int total_floats){ if(!p)return -1; cuCtxSetCurrent(p->mod->ctx);
if(p->ftasks) cudaFree(p->ftasks); cudaMalloc((void**)&p->ftasks,(size_t)total_floats*sizeof(float));
p->ntiles=ntiles; return cudaMemcpy(p->ftasks,ftasks,(size_t)total_floats*sizeof(float),cudaMemcpyHostToDevice)==cudaSuccess?0:-2; }
// Read tasks back (DtoH) after calculate_tiles_offsets updated them in place (for GpuQuad.updateTasks).
int tp_proc_get_tasks(TpProc* p, float* out, int total_floats){ if(!p||!p->ftasks)return -1; cuCtxSetCurrent(p->mod->ctx);
return cudaMemcpy(out,p->ftasks,(size_t)total_floats*sizeof(float),cudaMemcpyDeviceToHost)==cudaSuccess?0:-2; }
// Upload to a named __constant__ symbol in the module (LPF filters: lpf_data / lpf_corr / lpf_rb_corr).
// Mirrors GpuQuad.setLpfRbg/setLpfCorr (cuModuleGetGlobal + cuMemcpyHtoD), against the native module.
......
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