Skip to content
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

[SYCL] Remove operator name keywords #1501

Merged
merged 2 commits into from
Apr 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sycl/include/CL/sycl/intel/group_algorithm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ template <typename Group> bool none_of(Group g, bool pred) {
"Group algorithms only support the sycl::group and "
"intel::sub_group class.");
#ifdef __SYCL_DEVICE_ONLY__
return detail::spirv::GroupAll<Group>(not pred);
return detail::spirv::GroupAll<Group>(!pred);
#else
throw runtime_error("Group algorithms are not supported on host device.",
PI_INVALID_DEVICE);
Expand All @@ -239,7 +239,7 @@ EnableIfIsPointer<Ptr, bool> none_of(Group g, Ptr first, Ptr last,
static_assert(detail::is_generic_group<Group>::value,
"Group algorithms only support the sycl::group and "
"intel::sub_group class.");
return not any_of(g, first, last, pred);
return !any_of(g, first, last, pred);
#else
throw runtime_error("Group algorithms are not supported on host device.",
PI_INVALID_DEVICE);
Expand Down
11 changes: 11 additions & 0 deletions sycl/test/regression/operator-names.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// RUN: %clangxx -fsycl -c %s -o %t.out -Wno-deprecated -fno-operator-names
//
//===----------------------------------------------------------------------===//
// This test checks if any SYCL header files use C++ operator name keywords
// e.g. and, or, not
//
// This test does not use -fsyntax-only because it does not appear to respect
// the -fno-operator-names option
//===----------------------------------------------------------------------===//

#include <CL/sycl.hpp>