Further tests added to new structure
This commit is contained in:
parent
3f1288271d
commit
6378583a23
17 changed files with 636 additions and 514 deletions
|
|
@ -61,6 +61,12 @@ Sequence::end()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Sequence::clear() {
|
||||
KP_LOG_DEBUG("Kompute Sequence calling clear");
|
||||
this->end();
|
||||
}
|
||||
|
||||
std::shared_ptr<Sequence>
|
||||
Sequence::eval()
|
||||
{
|
||||
|
|
@ -69,6 +75,13 @@ Sequence::eval()
|
|||
return this->evalAsync()->evalAwait();
|
||||
}
|
||||
|
||||
std::shared_ptr<Sequence>
|
||||
Sequence::eval(std::shared_ptr<OpBase> op) {
|
||||
this->clear();
|
||||
this->record(op);
|
||||
this->eval();
|
||||
}
|
||||
|
||||
std::shared_ptr<Sequence>
|
||||
Sequence::evalAsync()
|
||||
{
|
||||
|
|
@ -138,8 +151,16 @@ Sequence::isRecording()
|
|||
return this->mRecording;
|
||||
}
|
||||
|
||||
bool
|
||||
Sequence::isInit() {
|
||||
return this->mDevice &&
|
||||
this->mCommandPool &&
|
||||
this->mCommandBuffer &&
|
||||
this->mComputeQueue;
|
||||
}
|
||||
|
||||
void
|
||||
Sequence::freeMemoryDestroyGPUResources()
|
||||
Sequence::destroy()
|
||||
{
|
||||
KP_LOG_DEBUG("Kompute Sequence freeMemoryDestroyGPUResources called");
|
||||
|
||||
|
|
@ -189,6 +210,16 @@ Sequence::freeMemoryDestroyGPUResources()
|
|||
this->mOperations.clear();
|
||||
}
|
||||
|
||||
if (this->mDevice) {
|
||||
this->mDevice = nullptr;
|
||||
}
|
||||
if (this->mPhysicalDevice) {
|
||||
this->mPhysicalDevice = nullptr;
|
||||
}
|
||||
if (this->mComputeQueue) {
|
||||
this->mComputeQueue = nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::shared_ptr<Sequence>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue