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
This commit is contained in:
foreman
2018-05-29 18:13:40 -04:00
orang tua a36ef232f2
melakukan 12315470b7
7 mengubah file dengan 13 tambahan dan 77 penghapusan
+5 -14
Melihat File
@@ -62,7 +62,7 @@ cl_int Program::addDeviceProgram(Device& device, const void* image, size_t lengt
return CL_INVALID_VALUE;
}
Device& rootDev = device.rootDevice();
Device& rootDev = device;
// if the rootDev is already associated with a program
if (devicePrograms_[&rootDev] != NULL) {
@@ -150,7 +150,7 @@ cl_int Program::addDeviceProgram(Device& device, const void* image, size_t lengt
}
device::Program* Program::getDeviceProgram(const Device& device) const {
const auto it = devicePrograms_.find(&device.rootDevice());
const auto it = devicePrograms_.find(&device);
if (it == devicePrograms_.cend()) {
return NULL;
}
@@ -613,20 +613,11 @@ bool Symbol::setDeviceKernel(const Device& device, const device::Kernel* func) {
}
const device::Kernel* Symbol::getDeviceKernel(const Device& device) const {
const devicekernels_t* devKernels = &deviceKernels_;
const auto itEnd = devKernels->cend();
auto it = devKernels->find(&device);
if (it != itEnd) {
auto it = deviceKernels_.find(&device);
if (it != deviceKernels_.cend()) {
return it->second;
}
for (it = devKernels->cbegin(); it != itEnd; ++it) {
if (it->first->isAncestor(&device)) {
return it->second;
}
}
return NULL;
return nullptr;
}
} // namespace amd