StimBuff: DevAttSpec should be a sh_ptr, not a plain ref
This commit is contained in:
@@ -37,7 +37,7 @@ getStimBuff(const std::shared_ptr<smo::device::DeviceAttachmentSpec>& spec)
|
||||
for (const auto& stimBuff : attachedStimBuffs)
|
||||
{
|
||||
// Compare device selectors to find matching buffer
|
||||
if (stimBuff->deviceAttachmentSpec.deviceSelector
|
||||
if (stimBuff->deviceAttachmentSpec->deviceSelector
|
||||
== spec->deviceSelector)
|
||||
{
|
||||
return stimBuff;
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
StimulusBuffer::PcloudFormatDesc formatDesc;
|
||||
formatDesc.format = StimulusBuffer::PcloudFormatDesc::Format::XYZI;
|
||||
auto pcloudStimBuff = std::make_shared<PcloudStimulusBuffer>(
|
||||
*context->spec, context->deviceTmp, formatDesc, histbuffMs, 30);
|
||||
context->spec, context->deviceTmp, formatDesc, histbuffMs, 30);
|
||||
|
||||
context->stimBuff = pcloudStimBuff;
|
||||
context->deviceTmp->nAttachedStimBuffs++;
|
||||
|
||||
@@ -9,12 +9,14 @@
|
||||
namespace smo {
|
||||
namespace stim_buff {
|
||||
|
||||
extern const SmoCallbacks* smoHooksPtr;
|
||||
|
||||
// OpenCL kernels are used to collate and produce our StimFrames.
|
||||
static SpMcRingBuffer::InputEngineConstraints openClInputConstraints(
|
||||
static_cast<size_t>(sysconf(_SC_PAGE_SIZE)), sizeof(void *));
|
||||
|
||||
PcloudStimulusBuffer::PcloudStimulusBuffer(
|
||||
const device::DeviceAttachmentSpec& deviceAttachmentSpec,
|
||||
const std::shared_ptr<device::DeviceAttachmentSpec> &deviceAttachmentSpec,
|
||||
std::shared_ptr<livoxProto1::Device> &device,
|
||||
const PcloudFormatDesc& formatDesc,
|
||||
int histbuffMs,
|
||||
@@ -24,7 +26,7 @@ PcloudStimulusBuffer::PcloudStimulusBuffer(
|
||||
static_cast<size_t>(histbuffMs / CONFIG_STIMBUFF_FRAME_PERIOD_MS),
|
||||
openClInputConstraints,
|
||||
device->componentThread->getIoService()),
|
||||
deviceAttachmentSpec(deviceAttachmentSpec), device(device),
|
||||
device(device),
|
||||
formatDesc(formatDesc), stagingBuffer(
|
||||
StagingBuffer::InputEngineConstraints::ioUringConstraints,
|
||||
OpenClConstraints(), nDgramsPerStagingBufferFrame),
|
||||
|
||||
@@ -26,7 +26,7 @@ class PcloudStimulusBuffer
|
||||
{
|
||||
public:
|
||||
explicit PcloudStimulusBuffer(
|
||||
const device::DeviceAttachmentSpec& deviceAttachmentSpec,
|
||||
const std::shared_ptr<device::DeviceAttachmentSpec> &deviceAttachmentSpec,
|
||||
std::shared_ptr<livoxProto1::Device> &device,
|
||||
const PcloudFormatDesc& formatDesc,
|
||||
int histbuffMs,
|
||||
@@ -55,7 +55,6 @@ public:
|
||||
void assembleAndProduceStimulusFrameReq(
|
||||
smo::Callback<assembleAndProduceStimulusFrameReqCbFn> callback);
|
||||
|
||||
device::DeviceAttachmentSpec deviceAttachmentSpec;
|
||||
std::shared_ptr<livoxProto1::Device> device;
|
||||
PcloudFormatDesc formatDesc;
|
||||
StagingBuffer stagingBuffer;
|
||||
|
||||
Reference in New Issue
Block a user