Skip to content

Commit a8471d8

Browse files
committed
[SYCL] Resolve min/max conflict
Adding #undef macros to resolve conflict between definitions of the min and max function in the CL/sycl.h and windows.h or another min and max define. confict type from sycl and windows.h Signed-off-by: Mochalova <[email protected]>
1 parent eb373c4 commit a8471d8

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

sycl/include/CL/sycl/builtins.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
// TODO Decide whether to mark functions with this attribute.
1818
#define __NOEXC /*noexcept*/
1919

20+
#undef min
21+
#undef max
2022
__SYCL_INLINE_NAMESPACE(cl) {
2123
namespace sycl {
2224
#ifdef __SYCL_DEVICE_ONLY__

sycl/include/CL/sycl/detail/generic_type_traits.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
#include <limits>
1919
#include <type_traits>
2020

21+
#undef min
22+
#undef max
23+
2124
__SYCL_INLINE_NAMESPACE(cl) {
2225
namespace sycl {
2326
namespace detail {

sycl/include/CL/sycl/half_type.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
#else
2626
#define __SYCL_CONSTEXPR_ON_DEVICE
2727
#endif
28+
#undef min
29+
#undef max
2830

2931
__SYCL_INLINE_NAMESPACE(cl) {
3032
namespace sycl {

0 commit comments

Comments
 (0)