StimFrame: Store ringbuff index as member var
Now each StimFrame knows its index within its parent SpMcRingbuff object.
This commit is contained in:
@@ -61,7 +61,7 @@ public:
|
||||
{
|
||||
slots[i].~StimulusFrame(); // Destroy default-constructed object
|
||||
new (&slots[i]) StimulusFrame(
|
||||
frameAssemblyDesc->slots[i], callbacks, flags);
|
||||
frameAssemblyDesc->slots[i], callbacks, flags, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,8 +77,10 @@ public:
|
||||
StimulusFrame(
|
||||
const FrameAssemblyDesc::SlotDesc& slotDesc_,
|
||||
const SmoCallbacks& callbacks,
|
||||
cl_mem_flags flags)
|
||||
: slotDesc(slotDesc_)
|
||||
cl_mem_flags flags,
|
||||
size_t ringBufferIndex_)
|
||||
: slotDesc(slotDesc_),
|
||||
ringBufferIndex(ringBufferIndex_)
|
||||
{
|
||||
if (!callbacks.ComputeManager_createUseHostPtrBuffer)
|
||||
{
|
||||
@@ -112,6 +114,7 @@ public:
|
||||
SimultaneityStamp simultaneityStamp;
|
||||
FrameAssemblyDesc::SlotDesc slotDesc;
|
||||
std::shared_ptr<smo::compute::ClBuffer> clBuffer;
|
||||
size_t ringBufferIndex;
|
||||
};
|
||||
|
||||
} // namespace stim_buff
|
||||
|
||||
@@ -1015,7 +1015,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << __func__ << ": pointsPerDgram=" << pointsPerDgram
|
||||
std::cout << __func__ << ": ringBufferIndex="
|
||||
<< context->intensityStimFrame->get().ringBufferIndex
|
||||
<< ", pointsPerDgram=" << pointsPerDgram
|
||||
<< ", nSucceeded=" << nSucceeded
|
||||
<< ", totalPoints=" << totalPoints
|
||||
<< ", highIntensityCount=" << highIntensityCount << std::endl;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <algorithm>
|
||||
#include <unistd.h>
|
||||
#include <iomanip>
|
||||
#include <cstddef>
|
||||
#include <user/spMcRingBuffer.h>
|
||||
#include <componentThread.h>
|
||||
#include <asynchronousLoop.h>
|
||||
@@ -88,7 +89,7 @@ tempStimulusFrame(
|
||||
0,
|
||||
reinterpret_cast<uint8_t*>(&tempStimulusFrameMem),
|
||||
sizeof(tempStimulusFrameMem)},
|
||||
*smoHooksPtr, 0)
|
||||
*smoHooksPtr, 0, SIZE_MAX)
|
||||
{
|
||||
if (smoHooksPtr->OptionParser_getOptions().verbose)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user