From 41aec8c1d032cf77f0fd6e5186e1113beb784666 Mon Sep 17 00:00:00 2001 From: Dmitriy Sobolev Date: Tue, 22 Oct 2024 12:36:33 -0500 Subject: [PATCH] Fix possible case Signed-off-by: Dmitriy Sobolev --- include/oneapi/dpl/pstl/hetero_backend_config.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/oneapi/dpl/pstl/hetero_backend_config.h b/include/oneapi/dpl/pstl/hetero_backend_config.h index d65b09d6e51..8bd33761371 100755 --- a/include/oneapi/dpl/pstl/hetero_backend_config.h +++ b/include/oneapi/dpl/pstl/hetero_backend_config.h @@ -44,11 +44,6 @@ # endif #endif -// If DPCPP backend is not explicitly turned off and SYCL is definitely available, enable it -#if (ONEDPL_USE_DPCPP_BACKEND || !defined(ONEDPL_USE_DPCPP_BACKEND)) && _ONEDPL_SYCL_AVAILABLE -# define _ONEDPL_BACKEND_SYCL 1 -#endif - // Include SYCL headers for "possible" case with reliable configurations only // Even if the headers are available, their inclusion may be dangerous if the compiler does not support SYCL #if defined(__ADAPTIVECPP__) @@ -65,7 +60,7 @@ # include # endif # if defined(CL_SYCL_LANGUAGE_VERSION) || defined(SYCL_LANGUAGE_VERSION) -# define _ONEDPL_BACKEND_SYCL 1 +# define _ONEDPL_SYCL_AVAILABLE 1 # endif #endif // _ONEDPL_SYCL_POSSIBLY_AVAILABLE @@ -75,6 +70,11 @@ but SYCL* headers are not found or the SYCL implementation does not define SYCL_LANGUAGE_VERSION macro" #endif +// If DPCPP backend is not explicitly turned off and SYCL is available, enable it +#if (ONEDPL_USE_DPCPP_BACKEND || !defined(ONEDPL_USE_DPCPP_BACKEND)) && _ONEDPL_SYCL_AVAILABLE +# define _ONEDPL_BACKEND_SYCL 1 +#endif + // If at least one heterogeneous backend is available, enable them #if _ONEDPL_BACKEND_SYCL # if _ONEDPL_HETERO_BACKEND