OClCollMeshEngn,PcloudStimProd: port to sscl::co coros

We've now ported the OpenClCollMeshEngn and PcloudStimProd::produceFrameReq
portions of the Livox pipeline to coros.
This commit is contained in:
2026-05-30 19:32:19 -04:00
parent 1cf1be4194
commit 35eb466a60
7 changed files with 398 additions and 373 deletions
@@ -13,7 +13,7 @@
#define CL_TARGET_OPENCL_VERSION 120
#include <CL/cl.h>
#include <spinscale/asynchronousLoop.h>
#include <spinscale/cps/callback.h>
#include <spinscale/co/invokers.h>
#include <spinscale/syncCancelerForAsyncWork.h>
#include <user/stimulusFrame.h>
#include <user/stagingBuffer.h>
@@ -86,14 +86,12 @@ public:
bool setup();
void finalize();
typedef std::function<void(bool, StimulusFrame&)>
compactCollateAndMeshFrameReqCbFn;
void compactCollateAndMeshFrameReq(
sscl::AsynchronousLoop& asyncLoop, StimulusFrame& stimulusFrame,
sscl::co::ViralNonPostingInvoker<bool> compactCollateAndMeshFrameCReq(
sscl::AsynchronousLoop& frameAssemblyResult,
StimulusFrame& stimulusFrame,
std::optional<std::reference_wrapper<StimulusFrame>> intensityStimFrame,
std::optional<AmbienceProductionDesc> lightAmbienceProductionDesc,
std::optional<AmbienceProductionDesc> darkAmbienceProductionDesc,
sscl::cps::Callback<compactCollateAndMeshFrameReqCbFn> callback);
std::optional<AmbienceProductionDesc> darkAmbienceProductionDesc);
private:
// Callback function types
@@ -214,9 +212,6 @@ private:
bool mapAverageIntensityBuffer(cl_map_flags mapFlags = CL_MAP_READ);
bool unmapAverageIntensityBuffer();
// Forward declaration for continuation class
class CompactCollateAndMeshFrameReq;
// Unified kernel start function
template<typename SetupArgsFn, typename ValidateBuffersFn>
bool startKernel(