-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL]Resolve min/max conflict #1339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The canonical way to do this is to require users of the windows.h header to #define NOMINMAX. That is the way the standard library handles it on windows (and I believe the IDE does by default in many cases).
b278807
to
a8471d8
Compare
Adding braces around min and max function declaration inside the SYCL doesn't help?: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test and fix clang format concerns.
The order of the macros (first "windows.h" then "CL/sycl.hpp" ) is necessary for proper testing |
@MochalovaAn, please, fix code formatting issues by applying clang-format to the patch. |
The order of the macros (first "windows.h" then "CL/sycl.hpp" ) is necessary for proper testing |
468cceb
to
2d9ab28
Compare
@MochalovaAn, please, take a look at LIT test failure on Windows platform. |
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]>
Use adding brackets around min & max function declarations instead of macros Signed-off-by: Mochalova <[email protected]>
Signed-off-by: amochalo <[email protected]>
Signed-off-by: amochalo <[email protected]>
Signed-off-by: Mochalova <[email protected]>
Signed-off-by: amochalo <[email protected]>
Signed-off-by: Mochalova <[email protected]>
Signed-off-by: Mochalova <[email protected]>
Signed-off-by: Mochalova <[email protected]> Co-Authored-By: Alexey Bader <[email protected]>
Signed-off-by: Mochalova <[email protected]>
Signed-off-by: Mochalova <[email protected]>
baad1c1
to
8089ee0
Compare
Signed-off-by: Mochalova <[email protected]>
Signed-off-by: Mochalova <[email protected]>
@romanovvlad, please, review. |
…_private_api * origin/sycl: (614 commits) [SYCL][Doc] Update prerequisites in GetStartedGuide (intel#1466) [SYCL][USM] Remove vestigial dead code (intel#1474) [SYCL-PTX] Fix __spirv_GroupAsyncCopy stride computation (intel#1451) [Driver][SYCL] Emit an error if c compilation is forced (intel#1438) [SYCL] Fix sycl-post-link when no split and symbols are requested. (intel#1454) [SYCL] Change priority of devices in default_selector (intel#1264) [CI] Update CODEOWNERS matching rules order (intel#1468) [SYCL] Share PFWG lambda object through shared memory (intel#1455) [CI] Fix CODEOWNERS file syntax (intel#1464) [SYCL][CUDA] Fix active context when creating base event (intel#1447) [SYCL] Diagnose implicit declaration of kernel function type (intel#1450) [BuildBot] Modify configure script (intel#1421) [SYCL] Resolve min/max conflict (intel#1339) [CI][BuildBot] Fix configure parameter to turn on/off assertions (intel#1449) [SYCL] XFAIL LIT test due to duplicate diagnostic [SYCL] Remove explicit sycl_device attribute requirement Apply more suggestions Apply suggestions Translate new set of Intel FPGA Loop Controls Translate Intel FPGA force_pow2_depth memory attribute ...
Resolve min/max conflict in the same way as it was done here: #1339 Needed to fix this failure: https://github.com/intel/llvm/actions/runs/3107743966/jobs/5036187282
Fix conflict with min/max macro on Windows in a similar way as in the #1339 This is needed to fix post-commit failure - https://github.com/intel/llvm/actions/runs/3687931956/jobs/6242122359
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.
Signed-off-by: Mochalova [email protected]