Skip to content

[SYCL] Revert friend changes to assignment and incr/decr for swizzles #12682

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

Merged
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
27 changes: 0 additions & 27 deletions sycl/include/sycl/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1814,19 +1814,6 @@ class SwizzleOp {
#ifdef __SYCL_OPASSIGN
#error "Undefine __SYCL_OPASSIGN macro."
#endif
#if defined(__INTEL_PREVIEW_BREAKING_CHANGES)
#define __SYCL_OPASSIGN(OPASSIGN, OP) \
friend SwizzleOp &operator OPASSIGN(SwizzleOp & Lhs, const DataT & Rhs) { \
Lhs.operatorHelper<OP>(vec_t(Rhs)); \
return Lhs; \
} \
template <typename RhsOperation> \
friend SwizzleOp &operator OPASSIGN(SwizzleOp & Lhs, \
const RhsOperation & Rhs) { \
Lhs.operatorHelper<OP>(Rhs); \
return Lhs; \
}
#else // defined(__INTEL_PREVIEW_BREAKING_CHANGES)
#define __SYCL_OPASSIGN(OPASSIGN, OP) \
SwizzleOp &operator OPASSIGN(const DataT & Rhs) { \
operatorHelper<OP>(vec_t(Rhs)); \
Expand All @@ -1837,7 +1824,6 @@ class SwizzleOp {
operatorHelper<OP>(Rhs); \
return *this; \
}
#endif // defined(__INTEL_PREVIEW_BREAKING_CHANGES)

__SYCL_OPASSIGN(+=, std::plus)
__SYCL_OPASSIGN(-=, std::minus)
Expand All @@ -1854,18 +1840,6 @@ class SwizzleOp {
#ifdef __SYCL_UOP
#error "Undefine __SYCL_UOP macro"
#endif
#if defined(__INTEL_PREVIEW_BREAKING_CHANGES)
#define __SYCL_UOP(UOP, OPASSIGN) \
friend SwizzleOp &operator UOP(SwizzleOp & Rhs) { \
Rhs OPASSIGN static_cast<DataT>(1); \
return Rhs; \
} \
friend vec_t operator UOP(SwizzleOp &Lhs, int) { \
vec_t Ret = Lhs; \
Lhs OPASSIGN static_cast<DataT>(1); \
return Ret; \
}
#else // defined(__INTEL_PREVIEW_BREAKING_CHANGES)
#define __SYCL_UOP(UOP, OPASSIGN) \
SwizzleOp &operator UOP() { \
*this OPASSIGN static_cast<DataT>(1); \
Expand All @@ -1876,7 +1850,6 @@ class SwizzleOp {
*this OPASSIGN static_cast<DataT>(1); \
return Ret; \
}
#endif // defined(__INTEL_PREVIEW_BREAKING_CHANGES)

__SYCL_UOP(++, +=)
__SYCL_UOP(--, -=)
Expand Down