Added device information to debug log

This commit is contained in:
Alessandro Pasotti 2018-04-17 14:49:41 +02:00
parent ff1b6c29bc
commit be8bfee990

View File

@ -39,7 +39,7 @@ void QgsOpenClUtils::init()
for ( auto &p : platforms ) for ( auto &p : platforms )
{ {
std::string platver = p.getInfo<CL_PLATFORM_VERSION>(); std::string platver = p.getInfo<CL_PLATFORM_VERSION>();
QgsDebugMsg( QStringLiteral( "Found platform %1: %2" ).arg( QString::fromStdString( platver ), QString::fromStdString( p.getInfo<CL_PLATFORM_NAME>() ) ) ); QgsDebugMsg( QStringLiteral( "Found OpenCL platform %1: %2" ).arg( QString::fromStdString( platver ), QString::fromStdString( p.getInfo<CL_PLATFORM_NAME>() ) ) );
if ( platver.find( "OpenCL 1." ) != std::string::npos ) if ( platver.find( "OpenCL 1." ) != std::string::npos )
{ {
std::vector<cl::Device> devices; std::vector<cl::Device> devices;
@ -70,6 +70,7 @@ void QgsOpenClUtils::init()
else else
{ {
cl::Device::setDefault( dev ); cl::Device::setDefault( dev );
QgsDebugMsg( QStringLiteral( "Found OpenCL device %1" ).arg( QString::fromStdString( dev.getInfo<CL_DEVICE_NAME>() ) ) );
sAvailable = true; sAvailable = true;
} }
} }