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
|
slots[i].~StimulusFrame(); // Destroy default-constructed object
|
||||||
new (&slots[i]) StimulusFrame(
|
new (&slots[i]) StimulusFrame(
|
||||||
frameAssemblyDesc->slots[i], callbacks, flags);
|
frameAssemblyDesc->slots[i], callbacks, flags, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,8 +77,10 @@ public:
|
|||||||
StimulusFrame(
|
StimulusFrame(
|
||||||
const FrameAssemblyDesc::SlotDesc& slotDesc_,
|
const FrameAssemblyDesc::SlotDesc& slotDesc_,
|
||||||
const SmoCallbacks& callbacks,
|
const SmoCallbacks& callbacks,
|
||||||
cl_mem_flags flags)
|
cl_mem_flags flags,
|
||||||
: slotDesc(slotDesc_)
|
size_t ringBufferIndex_)
|
||||||
|
: slotDesc(slotDesc_),
|
||||||
|
ringBufferIndex(ringBufferIndex_)
|
||||||
{
|
{
|
||||||
if (!callbacks.ComputeManager_createUseHostPtrBuffer)
|
if (!callbacks.ComputeManager_createUseHostPtrBuffer)
|
||||||
{
|
{
|
||||||
@@ -112,6 +114,7 @@ public:
|
|||||||
SimultaneityStamp simultaneityStamp;
|
SimultaneityStamp simultaneityStamp;
|
||||||
FrameAssemblyDesc::SlotDesc slotDesc;
|
FrameAssemblyDesc::SlotDesc slotDesc;
|
||||||
std::shared_ptr<smo::compute::ClBuffer> clBuffer;
|
std::shared_ptr<smo::compute::ClBuffer> clBuffer;
|
||||||
|
size_t ringBufferIndex;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace stim_buff
|
} // 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
|
<< ", nSucceeded=" << nSucceeded
|
||||||
<< ", totalPoints=" << totalPoints
|
<< ", totalPoints=" << totalPoints
|
||||||
<< ", highIntensityCount=" << highIntensityCount << std::endl;
|
<< ", highIntensityCount=" << highIntensityCount << std::endl;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
#include <cstddef>
|
||||||
#include <user/spMcRingBuffer.h>
|
#include <user/spMcRingBuffer.h>
|
||||||
#include <componentThread.h>
|
#include <componentThread.h>
|
||||||
#include <asynchronousLoop.h>
|
#include <asynchronousLoop.h>
|
||||||
@@ -88,7 +89,7 @@ tempStimulusFrame(
|
|||||||
0,
|
0,
|
||||||
reinterpret_cast<uint8_t*>(&tempStimulusFrameMem),
|
reinterpret_cast<uint8_t*>(&tempStimulusFrameMem),
|
||||||
sizeof(tempStimulusFrameMem)},
|
sizeof(tempStimulusFrameMem)},
|
||||||
*smoHooksPtr, 0)
|
*smoHooksPtr, 0, SIZE_MAX)
|
||||||
{
|
{
|
||||||
if (smoHooksPtr->OptionParser_getOptions().verbose)
|
if (smoHooksPtr->OptionParser_getOptions().verbose)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user