diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2016-09-30 15:15:15 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2016-09-30 15:15:15 +0200 |
commit | 5a1a0637f09e9f754fd7106027b684812e821d57 (patch) | |
tree | 114316263c3581f774a52050e874e31290699248 /ufo/ufo-resources.c | |
parent | 4edce818e07027c17c56fb140e09ded1c0852da9 (diff) |
Fix wrong device type selection
Diffstat (limited to 'ufo/ufo-resources.c')
-rw-r--r-- | ufo/ufo-resources.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ufo/ufo-resources.c b/ufo/ufo-resources.c index e42794e..4e9098b 100644 --- a/ufo/ufo-resources.c +++ b/ufo/ufo-resources.c @@ -392,9 +392,9 @@ initialize_opencl (UfoResourcesPrivate *priv) add_vendor_to_build_opts (priv->build_opts, priv->platform); device_type = 0; - device_type |= priv->device_type && UFO_DEVICE_CPU ? CL_DEVICE_TYPE_CPU : 0; - device_type |= priv->device_type && UFO_DEVICE_GPU ? CL_DEVICE_TYPE_GPU : 0; - device_type |= priv->device_type && UFO_DEVICE_ACC ? CL_DEVICE_TYPE_ACCELERATOR : 0; + device_type |= priv->device_type & UFO_DEVICE_CPU ? CL_DEVICE_TYPE_CPU : 0; + device_type |= priv->device_type & UFO_DEVICE_GPU ? CL_DEVICE_TYPE_GPU : 0; + device_type |= priv->device_type & UFO_DEVICE_ACC ? CL_DEVICE_TYPE_ACCELERATOR : 0; errcode = clGetDeviceIDs (priv->platform, device_type, 0, NULL, &priv->n_devices); UFO_RESOURCES_CHECK_AND_SET (errcode, &priv->construct_error); |