diff options
-rw-r--r-- | vm-opencl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vm-opencl.c b/vm-opencl.c index e2b1b2b..2a29fae 100644 --- a/vm-opencl.c +++ b/vm-opencl.c @@ -39,7 +39,11 @@ int opencl_init( opencl_sqlite_context *s, sqlite3 *db, } /* Access a device */ +#ifdef USE_CPU + err = clGetDeviceIDs(platform, CL_DEVICE_TYPE_CPU, 1, &device, NULL); +#else err = clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 1, &device, NULL); +#endif if(err < 0) { perror("ERROR: Couldn't find any devices."); exit(1); |