ClCollMeshEngn: Split start into start[Collate|Compact]Kernel()

These prepare each kernel separately. We'll unify them further.
This commit is contained in:
2025-11-09 16:12:10 -04:00
parent 683e107b04
commit b331af4f03
2 changed files with 131 additions and 34 deletions
@@ -35,13 +35,19 @@ public:
bool setup();
void finalize();
// Callback function type for collateFrameReq
typedef std::function<void()> collateFrameReqCbFn;
// Callback function types
typedef std::function<void()> compactKernelCbFn;
typedef std::function<void()> collateKernelCbFn;
bool start(
bool startCompactKernel(
StagingBuffer& assemblyBuff, uint32_t nSucceeded,
compactKernelCbFn callback);
bool startCollateKernel(
StagingBuffer& assemblyBuff, StagingBuffer& collationBuff,
collateFrameReqCbFn callback,
uint32_t nSucceeded);
collateKernelCbFn callback);
void stopCompactKernel();
void stopCollateKernel();
void stop();
private:
@@ -76,10 +82,13 @@ private:
std::shared_ptr<FrameAssemblyDesc> frameAssemblyDesc;
// Callback storage
collateFrameReqCbFn collateFrameReqCb;
compactKernelCbFn compactKernelCb;
collateKernelCbFn collateKernelCb;
// Static callback for OpenCL event
static void CL_CALLBACK kernelEventCallback(
// Static callbacks for OpenCL events
static void CL_CALLBACK compactKernelEventCallback(
cl_event event, cl_int event_command_exec_status, void* user_data);
static void CL_CALLBACK collateKernelEventCallback(
cl_event event, cl_int event_command_exec_status, void* user_data);
// Private helper methods