4141
4242#include "opencl.h"
4343
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
5345
5446#define MOD_NAME "[OpenCL] "
5547#define PARAM_NAME "opencl-device"
@@ -59,6 +51,14 @@ ADD_TO_PARAM(PARAM_NAME, PARAM_HELP);
5951
6052#ifdef HAVE_OPENCL
6153#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
6262
6363#define CHECK_OPENCL (cmd , errmsg , erraction ) \
6464 if ((cmd) != CL_SUCCESS) { \
@@ -303,7 +303,8 @@ opencl_get_device(void **platform_id, void **device_id)
303303 return false;
304304}
305305
306- #else
306+ #else // !defined HAVE_OPENCL
307+ #include "debug.h" // for MSG
307308void
308309list_opencl_devices (bool full )
309310{
@@ -317,4 +318,4 @@ opencl_get_device(void **platform_id, void **device_id)
317318 MSG (ERROR , "OpenCL support not compiled in!\n" );
318319 return false;
319320}
320- #endif
321+ #endif // defined HAVE_OPENCL
0 commit comments