From 9e381d0782f607708e8696ff27d00be5d72dbd18 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 7 Sep 2017 14:22:48 +0300 Subject: [PATCH] ts: dump OpenCL device extensions --- modules/ts/src/ocl_test.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/modules/ts/src/ocl_test.cpp b/modules/ts/src/ocl_test.cpp index 9f0acdec82..7c4d7d6538 100644 --- a/modules/ts/src/ocl_test.cpp +++ b/modules/ts/src/ocl_test.cpp @@ -181,6 +181,23 @@ void dumpOpenCLDevice() DUMP_MESSAGE_STDOUT(" Host unified memory = "<< isUnifiedMemoryStr); DUMP_PROPERTY_XML("cv_ocl_current_hostUnifiedMemory", device.hostUnifiedMemory()); + DUMP_MESSAGE_STDOUT(" Device extensions:"); + String extensionsStr = device.extensions(); + size_t pos = 0; + while (pos < extensionsStr.size()) + { + size_t pos2 = extensionsStr.find(' ', pos); + if (pos2 == String::npos) + pos2 = extensionsStr.size(); + if (pos2 > pos) + { + String extensionName = extensionsStr.substr(pos, pos2 - pos); + DUMP_MESSAGE_STDOUT(" " << extensionName); + } + pos = pos2 + 1; + } + DUMP_PROPERTY_XML("cv_ocl_current_extensions", extensionsStr.c_str()); + const char* haveAmdBlasStr = haveAmdBlas() ? "Yes" : "No"; DUMP_MESSAGE_STDOUT(" Has AMD Blas = "<< haveAmdBlasStr); DUMP_PROPERTY_XML("cv_ocl_current_AmdBlas", haveAmdBlas());