OClCollMeshEngn: Add method compactCollateAndMeshFrameReq
This method takes an input assembly buffer and selects which OpenCL kernels need to be executed on that buffer to transform the input data into the eventual output StimulusFrame for the current timeslice period.
This commit is contained in:
@@ -10,6 +10,9 @@
|
||||
#include <stdexcept>
|
||||
#define CL_TARGET_OPENCL_VERSION 300
|
||||
#include <CL/cl.h>
|
||||
#include <asynchronousLoop.h>
|
||||
#include <callback.h>
|
||||
#include <user/stimulusFrame.h>
|
||||
#include "stagingBuffer.h"
|
||||
#include "frameAssemblyDesc.h"
|
||||
|
||||
@@ -40,6 +43,8 @@ public:
|
||||
// Callback function types
|
||||
typedef std::function<void(cl_int)> compactKernelCbFn;
|
||||
typedef std::function<void(cl_int)> collateKernelCbFn;
|
||||
typedef std::function<void(bool, StimulusFrame&)>
|
||||
compactCollateAndMeshFrameReqCbFn;
|
||||
|
||||
bool startCompactKernel(
|
||||
StagingBuffer& assemblyBuff, uint32_t nSucceeded,
|
||||
@@ -52,6 +57,10 @@ public:
|
||||
void stopCollateKernel();
|
||||
void stop();
|
||||
|
||||
void compactCollateAndMeshFrameReq(
|
||||
AsynchronousLoop& asyncLoop, StimulusFrame& stimulusFrame,
|
||||
Callback<compactCollateAndMeshFrameReqCbFn> callback);
|
||||
|
||||
private:
|
||||
PcloudStimulusBuffer& parent;
|
||||
|
||||
@@ -106,6 +115,9 @@ private:
|
||||
StagingBuffer& assemblyBuff, uint32_t nSucceeded);
|
||||
bool setupCollateDgramsArgs(StagingBuffer& assemblyBuff);
|
||||
|
||||
// Forward declaration for continuation class
|
||||
class CompactCollateAndMeshFrameReq;
|
||||
|
||||
// Unified kernel start function
|
||||
template<typename SetupArgsFn, typename ValidateBuffersFn>
|
||||
bool startKernel(
|
||||
|
||||
Reference in New Issue
Block a user