P4 to Git Change 1561216 by gandryey@gera-w8 on 2018/05/29 18:05:31
SWDEV-79445 - OCL generic changes and code clean-up - Remove parent_ field from the device object, since it was used for subdevices only. Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_device.cpp#72 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#219 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#304 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#590 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#91 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/context.cpp#52 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#94 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/program.hpp#45 edit
Этот коммит содержится в:
@@ -198,18 +198,14 @@ void Device::tearDown() {
|
||||
#endif // WITH_PAL_DEVICE
|
||||
}
|
||||
|
||||
Device::Device(Device* parent)
|
||||
Device::Device()
|
||||
: settings_(NULL),
|
||||
online_(true),
|
||||
blitProgram_(NULL),
|
||||
hwDebugMgr_(NULL),
|
||||
parent_(parent),
|
||||
vaCacheAccess_(nullptr),
|
||||
vaCacheMap_(nullptr) {
|
||||
memset(&info_, '\0', sizeof(info_));
|
||||
if (parent_ != NULL) {
|
||||
parent_->retain();
|
||||
}
|
||||
}
|
||||
|
||||
Device::~Device() {
|
||||
@@ -223,12 +219,8 @@ Device::~Device() {
|
||||
delete settings_;
|
||||
}
|
||||
|
||||
if (parent_ != NULL) {
|
||||
parent_->release();
|
||||
} else {
|
||||
if (info_.extensions_ != NULL) {
|
||||
delete[] info_.extensions_;
|
||||
}
|
||||
if (info_.extensions_ != NULL) {
|
||||
delete[] info_.extensions_;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,15 +236,6 @@ bool Device::create() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Device::isAncestor(const Device* sub) const {
|
||||
for (const Device* d = sub->parent_; d != NULL; d = d->parent_) {
|
||||
if (d == this) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Device::registerDevice() {
|
||||
assert(Runtime::singleThreaded() && "this is not thread-safe");
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user