Skip to content

Instantly share code, notes, and snippets.

if (!cv::ocl::haveOpenCL()){
std::cout << "Device is not OpenCL capable" << std::endl;
}
else {
cv::ocl::setUseOpenCL(1);
if (cv::ocl::haveAmdFft())
std::cout << "OCL: Device is AMD FFT Ready" << std::endl;
if (cv::ocl::haveSVM())
std::cout << "OCL: Device is SVM Ready" << std::endl;
std::vector<cv::ocl::PlatformInfo> plt_info;
@drewski1992
drewski1992 / gist:f2e35191ce5b94400068
Created October 18, 2014 17:38
Get Cuda Device Description
if((cuda_device_count = getCudaEnabledDeviceCount()) == 0) {
printf("No GPU found or the library is compiled without GPU support\n");
return -1;
}
printf("Number of enabled Cuda devices: %d\n", cuda_device_count);
for(int device = 0; device<cuda_device_count; device++) {
printShortCudaDeviceInfo(device);
}