diff options
author | Rodeo <[email protected]> | 2013-11-02 20:48:34 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2013-11-02 20:48:34 +0000 |
commit | 4a08a924b074b2691950bf0beddecdb73658104f (patch) | |
tree | 1d69d7392509310fd3a5cd57255d0308858c3490 /libhb/openclwrapper.c | |
parent | b94f4686f052a9129c54b0bb5af39d6e86554872 (diff) |
OpenCL: initial work on a new OpenCl wrapper, which will eventually phase out the existing one.
Based on an x264 patch by Anton Mitrofanov.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5870 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/openclwrapper.c')
-rw-r--r-- | libhb/openclwrapper.c | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/libhb/openclwrapper.c b/libhb/openclwrapper.c index 327eee372..b5faf7041 100644 --- a/libhb/openclwrapper.c +++ b/libhb/openclwrapper.c @@ -1144,71 +1144,6 @@ void hb_opencl_init() hb_get_opencl_env(); } -void hb_opencl_info_print() -{ - cl_uint i, numDevices; - cl_device_id *devices; - - if (hb_init_opencl_env(&gpu_env)) - { - return; - } - - if (clGetContextInfo(gpu_env.context, CL_CONTEXT_NUM_DEVICES, - sizeof(numDevices), &numDevices, NULL) != CL_SUCCESS) - { - return; - } - - if ((devices = malloc(sizeof(cl_device_id) * numDevices)) == NULL) - { - return; - } - - if (clGetContextInfo(gpu_env.context, CL_CONTEXT_DEVICES, - sizeof(cl_device_id) * numDevices, devices, NULL) != CL_SUCCESS) - { - return; - } - - for (i = 0; i < numDevices; i++) - { - if (devices[i] != NULL) - { - char vendor[100], name[1024], version[1024]; - cl_device_type device_type; - char *device_type_name = "Unknown"; - - clGetDeviceInfo(devices[i], CL_DEVICE_VENDOR, sizeof(vendor), - vendor, NULL); - clGetDeviceInfo(devices[i], CL_DEVICE_NAME, sizeof(name), - name, NULL); - clGetDeviceInfo(devices[i], CL_DRIVER_VERSION, sizeof(version), - version, NULL); - clGetDeviceInfo(devices[i], CL_DEVICE_TYPE, sizeof(device_type), - &device_type, NULL); - - if (device_type & CL_DEVICE_TYPE_GPU) - device_type_name = "GPU"; - else - if (device_type & CL_DEVICE_TYPE_CPU) - device_type_name = "CPU"; - else - if (device_type & CL_DEVICE_TYPE_ACCELERATOR) - device_type_name = "Accelerator"; - else - if (device_type & CL_DEVICE_TYPE_CUSTOM) - device_type_name = "Custom"; - - hb_log("GPU #%d: %s %s", i + 1, vendor, name); - hb_log(" - driver version: %s", version); - hb_log(" - OpenCL device type: %s%s",device_type_name,device_type & CL_DEVICE_TYPE_DEFAULT ? "/Default" : ""); - } - } - - free(devices); -} - int hb_use_buffers() { return useBuffers; |