Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Add missing destructor #556

Merged
merged 2 commits into from
Jun 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions omniscidb/L0Mgr/L0Mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ L0Driver::L0Driver(ze_driver_handle_t handle) : driver_(handle) {
L0Driver::~L0Driver() {
auto status = (zeContextDestroy(context_));
if (status) {
std::cerr << "Non-zero status for context destructor" << std::endl;
LOG(ERROR) << "Non-zero status for context destructor";
}
}

Expand Down Expand Up @@ -114,6 +114,10 @@ ze_command_list_handle_t L0CommandList::handle() const {

L0CommandList::~L0CommandList() {
// TODO: maybe return to pool
auto status = zeCommandListDestroy(handle_);
if (status) {
LOG(ERROR) << "Non-zero status for command list destructor";
}
}

void L0CommandList::copy(void* dst, const void* src, const size_t num_bytes) {
Expand Down Expand Up @@ -197,7 +201,7 @@ ze_command_queue_handle_t L0CommandQueue::handle() const {
L0CommandQueue::~L0CommandQueue() {
auto status = (zeCommandQueueDestroy(handle_));
if (status) {
std::cerr << "Non-zero status for command queue destructor" << std::endl;
LOG(ERROR) << "Non-zero status for command queue destructor";
}
}

Expand Down Expand Up @@ -249,7 +253,7 @@ ze_module_handle_t L0Module::handle() const {
L0Module::~L0Module() {
auto status = zeModuleDestroy(handle_);
if (status) {
std::cerr << "Non-zero status for command module destructor" << std::endl;
LOG(ERROR) << "Non-zero status for command module destructor";
}
}

Expand Down Expand Up @@ -301,7 +305,7 @@ std::string L0Kernel::desc() const {
L0Kernel::~L0Kernel() {
auto status = zeKernelDestroy(handle_);
if (status) {
std::cerr << "Non-zero status for command kernel destructor" << std::endl;
LOG(ERROR) << "Non-zero status for command kernel destructor";
}
}

Expand Down