StagingBuffer: add OpenCL buff handles to StimFrames

This commit is contained in:
2025-11-19 23:43:17 -04:00
parent 27b43c6686
commit 5789a31e23
7 changed files with 73 additions and 19 deletions
+9 -2
View File
@@ -7,8 +7,11 @@
#include <user/spMcRingBuffer.h>
#include <user/stagingBuffer.h>
#include <user/frameAssemblyDesc.h>
#include <user/senseApiDesc.h>
#include "stimulusFrame.h"
#include "deviceAttachmentSpec.h"
#define CL_TARGET_OPENCL_VERSION 120
#include <CL/cl.h>
namespace smo {
namespace stim_buff {
@@ -31,7 +34,9 @@ public:
&deviceAttachmentSpec,
int histbuffMs,
const StagingBuffer::IOEngineConstraints& inputEngineConstraints,
const StagingBuffer::IOEngineConstraints& outputEngineConstraints)
const StagingBuffer::IOEngineConstraints& outputEngineConstraints,
const SmoCallbacks& callbacks,
cl_mem_flags flags)
: parent(parent),
deviceAttachmentSpec(deviceAttachmentSpec),
histbuffMs(histbuffMs),
@@ -39,7 +44,9 @@ public:
inputEngineConstraints,
outputEngineConstraints,
static_cast<size_t>(histbuffMs / CONFIG_STIMBUFF_FRAME_PERIOD_MS)),
ringBuffer(static_cast<std::shared_ptr<FrameAssemblyDesc>>(stagingBuffer))
ringBuffer(
static_cast<std::shared_ptr<FrameAssemblyDesc>>(stagingBuffer),
callbacks, flags)
{}
virtual ~StimulusBuffer() = default;