diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-07-04 14:59:35 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-07-04 15:48:34 +0300 |
commit | 5dff961ba5fab6d451d9d993e076d190a93be495 (patch) | |
tree | 3685a1f0d0b7798be664fad2a8b6626cf60191c1 /sc | |
parent | c5922978c87e246c1bc2ae6111415ec0764d6865 (diff) |
Don't look for just GPUs
Change-Id: Ie7dbeac17b6dc56616ae5fa16f71d568a7771d5b
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/opencl/openclwrapper.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx index fcb6c02cdac2..f85f1723738e 100644 --- a/sc/source/core/opencl/openclwrapper.cxx +++ b/sc/source/core/opencl/openclwrapper.cxx @@ -175,7 +175,7 @@ int OpenclDevice::BinaryGenerated(const char * clFileName, FILE ** fhandle) { FILE *fd = NULL; cl_uint numDevices=0; status = clGetDeviceIDs(gpuEnv.platform, // platform - CL_DEVICE_TYPE_GPU, // device_type + CL_DEVICE_TYPE_ALL, // device_type 0, // num_entries NULL, // devices &numDevices); @@ -651,7 +651,7 @@ int OpenclDevice::InitOpenclRunEnv(GPUEnv *gpuInfo) gpuInfo->platform = platforms[i]; status = clGetDeviceIDs(gpuInfo->platform, // platform - CL_DEVICE_TYPE_GPU, // device_type + CL_DEVICE_TYPE_ALL, // device_type 0, // num_entries NULL, // devices &numDevices); @@ -681,12 +681,15 @@ int OpenclDevice::InitOpenclRunEnv(GPUEnv *gpuInfo) gpuInfo->context = clCreateContextFromType(cps, gpuInfo->dType, NULL, NULL, &status); + // If no GPU, check for CPU. if ((gpuInfo->context == (cl_context) NULL) || (status != CL_SUCCESS)) { gpuInfo->dType = CL_DEVICE_TYPE_CPU; gpuInfo->context = clCreateContextFromType(cps, gpuInfo->dType, NULL, NULL, &status); } + + // If no GPU or CPU, check for a "default" type. if ((gpuInfo->context == (cl_context) NULL) || (status != CL_SUCCESS)) { gpuInfo->dType = CL_DEVICE_TYPE_DEFAULT; |