From: Andrey Alekseenko Date: Wed, 20 Oct 2021 13:06:53 +0000 (+0200) Subject: Fix compiler warnings with OpenCL + oneAPI 2021.4 X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?p=alexxy%2Fgromacs.git;a=commitdiff_plain;h=6aab6e7bc39fd39655bd54e558a44e1acf3704fc Fix compiler warnings with OpenCL + oneAPI 2021.4 --- diff --git a/src/gromacs/gpu_utils/device_context_ocl.cpp b/src/gromacs/gpu_utils/device_context_ocl.cpp index b342d24991..7cd75a04db 100644 --- a/src/gromacs/gpu_utils/device_context_ocl.cpp +++ b/src/gromacs/gpu_utils/device_context_ocl.cpp @@ -55,10 +55,18 @@ /*! \brief Copies of values from cl_driver_diagnostics_intel.h, * which isn't guaranteed to be available. */ /**@{*/ -# define CL_CONTEXT_SHOW_DIAGNOSTICS_INTEL 0x4106 -# define CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL 0x1 -# define CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL 0x2 -# define CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL 0x4 +# ifndef CL_CONTEXT_SHOW_DIAGNOSTICS_INTEL +# define CL_CONTEXT_SHOW_DIAGNOSTICS_INTEL 0x4106 +# endif +# ifndef CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL +# define CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL 0x1 +# endif +# ifndef CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL +# define CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL 0x2 +# endif +# ifndef CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL +# define CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL 0x4 +# endif /**@}*/ DeviceContext::DeviceContext(const DeviceInformation& deviceInfo) : deviceInfo_(deviceInfo)