Updated manager to have unique sequence added on default operations
This commit is contained in:
parent
1053cde1f0
commit
ba71c7ab46
3 changed files with 35 additions and 15 deletions
|
|
@ -95,6 +95,7 @@ std::weak_ptr<Sequence>
|
|||
Manager::getOrCreateManagedSequence(std::string sequenceName)
|
||||
{
|
||||
SPDLOG_DEBUG("Kompute Manager creating Sequence object");
|
||||
|
||||
std::unordered_map<std::string, std::shared_ptr<Sequence>>::iterator found =
|
||||
this->mManagedSequences.find(sequenceName);
|
||||
|
||||
|
|
@ -120,7 +121,16 @@ Manager::createManagedSequence(std::string sequenceName, uint32_t queueIndex)
|
|||
this->mComputeQueues[queueIndex],
|
||||
this->mComputeQueueFamilyIndeces[queueIndex]);
|
||||
sq->init();
|
||||
this->mManagedSequences.insert({ sequenceName, sq });
|
||||
|
||||
if (sequenceName.empty()) {
|
||||
this->mCurrentSequenceIndex++;
|
||||
this->mManagedSequences.insert({ KP_DEFAULT_SESSION + std::to_string(this->mCurrentSequenceIndex), sq });
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: Check if sequence doens't already exist
|
||||
this->mManagedSequences.insert({ sequenceName, sq });
|
||||
}
|
||||
return sq;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue