Skip to content

Commit 9e381d0

Browse files
committed
ts: dump OpenCL device extensions
1 parent 169add5 commit 9e381d0

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

modules/ts/src/ocl_test.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,23 @@ void dumpOpenCLDevice()
181181
DUMP_MESSAGE_STDOUT(" Host unified memory = "<< isUnifiedMemoryStr);
182182
DUMP_PROPERTY_XML("cv_ocl_current_hostUnifiedMemory", device.hostUnifiedMemory());
183183

184+
DUMP_MESSAGE_STDOUT(" Device extensions:");
185+
String extensionsStr = device.extensions();
186+
size_t pos = 0;
187+
while (pos < extensionsStr.size())
188+
{
189+
size_t pos2 = extensionsStr.find(' ', pos);
190+
if (pos2 == String::npos)
191+
pos2 = extensionsStr.size();
192+
if (pos2 > pos)
193+
{
194+
String extensionName = extensionsStr.substr(pos, pos2 - pos);
195+
DUMP_MESSAGE_STDOUT(" " << extensionName);
196+
}
197+
pos = pos2 + 1;
198+
}
199+
DUMP_PROPERTY_XML("cv_ocl_current_extensions", extensionsStr.c_str());
200+
184201
const char* haveAmdBlasStr = haveAmdBlas() ? "Yes" : "No";
185202
DUMP_MESSAGE_STDOUT(" Has AMD Blas = "<< haveAmdBlasStr);
186203
DUMP_PROPERTY_XML("cv_ocl_current_AmdBlas", haveAmdBlas());

0 commit comments

Comments
 (0)