Skip to content

Commit 89b9b5e

Browse files
authored
Revert "[SYCL] Adds complex Literals support to sycl::experimental::complex (#9819)"
This reverts commit 83555cd.
1 parent 177680e commit 89b9b5e

File tree

3 files changed

+0
-60
lines changed

3 files changed

+0
-60
lines changed

sycl/doc/extensions/proposed/sycl_ext_oneapi_complex.asciidoc

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -438,33 +438,6 @@ mathematical operation.
438438
|Compute the hyperbolic tangent of complex number x.
439439
|===
440440

441-
442-
=== Suffixes for complex number literals
443-
444-
This proposal describes literal suffixes for constructing complex number literals.
445-
The suffixes `i` and `if` create complex numbers of the types `complex<double>` and `complex<float>` respectively, with their imaginary part denoted by the given literal number and the real part being zero.
446-
447-
```C++
448-
namespace sycl {
449-
namespace ext {
450-
namespace oneapi {
451-
452-
namespace literals {
453-
namespace complex_literals {
454-
constexpr complex<double> operator""i(long double x);
455-
constexpr complex<double> operator""i(unsigned long long x);
456-
457-
constexpr complex<float> operator""if(long double x);
458-
constexpr complex<float> operator""if(unsigned long long x);
459-
} // namespace complex_literals
460-
} // namespace literals
461-
462-
} // namespace oneapi
463-
} // namespace ext
464-
} // namespace sycl
465-
```
466-
467-
468441
== Implementation notes
469442

470443
The complex mathematical operations can all be defined using SYCL built-ins.

sycl/include/sycl/ext/oneapi/experimental/sycl_complex.hpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -979,27 +979,6 @@ tan(const complex<_Tp> &__x) {
979979
return complex<_Tp>(__z.imag(), -__z.real());
980980
}
981981

982-
// Literal suffix for complex number literals [complex.literals]
983-
inline namespace literals {
984-
inline namespace complex_literals {
985-
constexpr complex<double> operator""i(long double __im) {
986-
return {0.0, static_cast<double>(__im)};
987-
}
988-
989-
constexpr complex<double> operator""i(unsigned long long __im) {
990-
return {0.0, static_cast<double>(__im)};
991-
}
992-
993-
constexpr complex<float> operator""if(long double __im) {
994-
return {0.0f, static_cast<float>(__im)};
995-
}
996-
997-
constexpr complex<float> operator""if(unsigned long long __im) {
998-
return {0.0f, static_cast<float>(__im)};
999-
}
1000-
} // namespace complex_literals
1001-
} // namespace literals
1002-
1003982
} // namespace experimental
1004983
} // namespace oneapi
1005984
} // namespace ext

sycl/test/extensions/test_complex.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,6 @@ void check_sycl_constructor_from_std() {
186186
}
187187
}
188188

189-
// Check types for sycl complex constructed from literals
190-
void check_sycl_complex_literals() {
191-
static_assert(
192-
std::is_same_v<decltype(0.3if),
193-
sycl::ext::oneapi::experimental::complex<float>>);
194-
static_assert(
195-
std::is_same_v<decltype(0.3i),
196-
sycl::ext::oneapi::experimental::complex<double>>);
197-
}
198-
199189
int main() {
200190
check_math_function_types();
201191
check_math_operator_types();
@@ -205,7 +195,5 @@ int main() {
205195
check_std_to_sycl_conversion();
206196
check_sycl_constructor_from_std();
207197

208-
check_sycl_complex_literals();
209-
210198
return 0;
211199
}

0 commit comments

Comments
 (0)