41
41
42
42
#include "opencl.h"
43
43
44
- #include <assert.h>
45
- #include <stdio.h>
46
- #include <string.h>
47
-
48
- #include "compat/strings.h" // for strcasecmp
49
- #include "debug.h" // for MSG
50
- #include "host.h" // for get_commandline_param
51
- #include "utils/macros.h" // for ARR_COUNT, SHORT_STR
52
- #include "utils/color_out.h" // for TBOLD
44
+ #include "host.h" // for ADD_TO_PARAM, get_commandline_param
53
45
54
46
#define MOD_NAME "[OpenCL] "
55
47
#define PARAM_NAME "opencl-device"
@@ -59,6 +51,14 @@ ADD_TO_PARAM(PARAM_NAME, PARAM_HELP);
59
51
60
52
#ifdef HAVE_OPENCL
61
53
#include <CL/cl.h>
54
+ #include <assert.h>
55
+ #include <stdio.h>
56
+ #include <string.h>
57
+
58
+ #include "compat/strings.h" // for strcasecmp
59
+ #include "debug.h" // for MSG
60
+ #include "utils/macros.h" // for ARR_COUNT, SHORT_STR
61
+ #include "utils/color_out.h" // for TBOLD
62
62
63
63
#define CHECK_OPENCL (cmd , errmsg , erraction ) \
64
64
if ((cmd) != CL_SUCCESS) { \
@@ -303,7 +303,8 @@ opencl_get_device(void **platform_id, void **device_id)
303
303
return false;
304
304
}
305
305
306
- #else
306
+ #else // !defined HAVE_OPENCL
307
+ #include "debug.h" // for MSG
307
308
void
308
309
list_opencl_devices (bool full )
309
310
{
@@ -317,4 +318,4 @@ opencl_get_device(void **platform_id, void **device_id)
317
318
MSG (ERROR , "OpenCL support not compiled in!\n" );
318
319
return false;
319
320
}
320
- #endif
321
+ #endif // defined HAVE_OPENCL
0 commit comments