From 8cc5b980512c02cee20c9f6f82a4531750e75778 Mon Sep 17 00:00:00 2001 From: yao Date: Fri, 5 Apr 2013 09:19:59 +0800 Subject: [PATCH] Fix the problem of device selection on hybrid video systems. --- modules/ocl/test/main.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/ocl/test/main.cpp b/modules/ocl/test/main.cpp index 856828d6a5..dd46ff6e06 100644 --- a/modules/ocl/test/main.cpp +++ b/modules/ocl/test/main.cpp @@ -115,10 +115,9 @@ int main(int argc, char **argv) std::cout << "platform invalid\n"; return -1; } - if(pid != 0 || device != 0) - { - setDevice(oclinfo[pid], device); - } + + setDevice(oclinfo[pid], device); + cout << "Device type:" << type << endl << "Device name:" << oclinfo[pid].DeviceName[device] << endl; return RUN_ALL_TESTS(); }