|
|
@ -1712,6 +1712,17 @@ struct Device::Impl |
|
|
|
|
|
|
|
|
|
|
|
String deviceVersion_ = getStrProp(CL_DEVICE_VERSION); |
|
|
|
String deviceVersion_ = getStrProp(CL_DEVICE_VERSION); |
|
|
|
parseDeviceVersion(deviceVersion_, deviceVersionMajor_, deviceVersionMinor_); |
|
|
|
parseDeviceVersion(deviceVersion_, deviceVersionMajor_, deviceVersionMinor_); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendorName = getStrProp(CL_DEVICE_VENDOR); |
|
|
|
|
|
|
|
if (vendorName == "Advanced Micro Devices, Inc." || |
|
|
|
|
|
|
|
vendorName == "AMD") |
|
|
|
|
|
|
|
vendor_ = AMD; |
|
|
|
|
|
|
|
else if (vendorName == "Intel(R) Corporation") |
|
|
|
|
|
|
|
vendor_ = INTEL; |
|
|
|
|
|
|
|
else if (vendorName == "NVIDIA Corporation") |
|
|
|
|
|
|
|
vendor_ = NVIDIA; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
vendor_ = UNKNOWN_VENDOR; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template<typename _TpCL, typename _TpOut> |
|
|
|
template<typename _TpCL, typename _TpOut> |
|
|
@ -1754,6 +1765,8 @@ struct Device::Impl |
|
|
|
int deviceVersionMajor_; |
|
|
|
int deviceVersionMajor_; |
|
|
|
int deviceVersionMinor_; |
|
|
|
int deviceVersionMinor_; |
|
|
|
String driverVersion_; |
|
|
|
String driverVersion_; |
|
|
|
|
|
|
|
String vendorName; |
|
|
|
|
|
|
|
int vendor_; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1814,7 +1827,7 @@ String Device::version() const |
|
|
|
{ return p ? p->version_ : String(); } |
|
|
|
{ return p ? p->version_ : String(); } |
|
|
|
|
|
|
|
|
|
|
|
String Device::vendor() const |
|
|
|
String Device::vendor() const |
|
|
|
{ return p ? p->getStrProp(CL_DEVICE_VENDOR) : String(); } |
|
|
|
{ return p ? p->vendorName : String(); } |
|
|
|
|
|
|
|
|
|
|
|
String Device::OpenCL_C_Version() const |
|
|
|
String Device::OpenCL_C_Version() const |
|
|
|
{ return p ? p->getStrProp(CL_DEVICE_OPENCL_C_VERSION) : String(); } |
|
|
|
{ return p ? p->getStrProp(CL_DEVICE_OPENCL_C_VERSION) : String(); } |
|
|
@ -1925,6 +1938,21 @@ size_t Device::imageMaxArraySize() const |
|
|
|
{ CV_REQUIRE_OPENCL_1_2_ERROR; } |
|
|
|
{ CV_REQUIRE_OPENCL_1_2_ERROR; } |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool Device::isAMD() const |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return p->vendor_ == AMD; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool Device::isIntel() const |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return p->vendor_ == INTEL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool Device::isNvidia() const |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return p->vendor_ == NVIDIA; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int Device::maxClockFrequency() const |
|
|
|
int Device::maxClockFrequency() const |
|
|
|
{ return p ? p->getProp<cl_uint, int>(CL_DEVICE_MAX_CLOCK_FREQUENCY) : 0; } |
|
|
|
{ return p ? p->getProp<cl_uint, int>(CL_DEVICE_MAX_CLOCK_FREQUENCY) : 0; } |
|
|
|
|
|
|
|
|
|
|
|