Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

According to the OpenCV's documentation:

Right now, the user can select OpenCL device by specifying the environment variable OPENCV_OPENCL_DEVICE. Variable format:

<Platform>:<CPU|GPU|ACCELERATOR|nothing=GPU/CPU>:<DeviceName or ID>

Note: Device ID range is: 0..9 (only one digit, 10 - it is a part of name)

Samples:

'' = ':' = '::' = ':GPU|CPU:'

'AMD:GPU|CPU:'

'AMD::Tahiti'

':GPU:1'

':CPU:2'

Also the user can use cv::ocl::setDevice function (with cv::ocl::getOpenCLPlatforms and cv::ocl::getOpenCLDevices). This function initializes OpenCL runtime and setup the passed device as computing device.