Added functionality for named sequences to be created
This commit is contained in:
parent
c8db55aa1b
commit
b91c392f5e
15 changed files with 299 additions and 173 deletions
|
|
@ -71,16 +71,25 @@ Manager::~Manager()
|
|||
}
|
||||
|
||||
std::weak_ptr<Sequence>
|
||||
Manager::managedSequence()
|
||||
Manager::getOrCreateManagedSequence(std::string sessionName)
|
||||
{
|
||||
SPDLOG_DEBUG("Kompute Manager creating Sequence object");
|
||||
std::shared_ptr<Sequence> sq = std::make_shared<Sequence>(
|
||||
this->mPhysicalDevice,
|
||||
this->mDevice,
|
||||
this->mComputeQueue,
|
||||
this->mComputeQueueFamilyIndex);
|
||||
this->mManagedSequences.push_back(sq);
|
||||
return sq;
|
||||
std::unordered_map<std::string, std::shared_ptr<Sequence>>::iterator
|
||||
found = this->mManagedSequences.find(sessionName);
|
||||
|
||||
if (found == this->mManagedSequences.end()) {
|
||||
std::shared_ptr<Sequence> sq =
|
||||
std::make_shared<Sequence>(this->mPhysicalDevice,
|
||||
this->mDevice,
|
||||
this->mComputeQueue,
|
||||
this->mComputeQueueFamilyIndex);
|
||||
sq->init();
|
||||
this->mManagedSequences.insert({sessionName, sq});
|
||||
return sq;
|
||||
}
|
||||
else {
|
||||
return found->second;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue