From ff1928657a9ff3f2881e163c09b7ccb6c13a4331 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Tue, 4 Aug 2015 17:17:49 +0300 Subject: [PATCH] Add more info on CL device info printing --- libethash-cl/ethash_cl_miner.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/libethash-cl/ethash_cl_miner.cpp b/libethash-cl/ethash_cl_miner.cpp index e8077598a..28afc6e58 100644 --- a/libethash-cl/ethash_cl_miner.cpp +++ b/libethash-cl/ethash_cl_miner.cpp @@ -284,6 +284,25 @@ void ethash_cl_miner::listDevices() doForAllDevices([&outString, &i](cl::Device const _device) { outString += "[" + to_string(i) + "] " + _device.getInfo() + "\n"; + outString += "\tCL_DEVICE_TYPE: "; + switch (_device.getInfo()) + { + case CL_DEVICE_TYPE_CPU: + outString += "CPU\n"; + break; + case CL_DEVICE_TYPE_GPU: + outString += "GPU\n"; + break; + case CL_DEVICE_TYPE_ACCELERATOR: + outString += "ACCELERATOR\n"; + break; + default: + outString += "DEFAULT\n"; + break; + } + outString += "\tCL_DEVICE_GLOBAL_MEM_SIZE: " + to_string(_device.getInfo()) + "\n"; + outString += "\tCL_DEVICE_MAX_MEM_ALLOC_SIZE: " + to_string(_device.getInfo()) + "\n"; + outString += "\tCL_DEVICE_MAX_WORK_GROUP_SIZE: " + to_string(_device.getInfo()) + "\n"; ++i; } );