@@ -210,7 +210,17 @@ namespace oneapi {
210
210
211
211
// operator<<
212
212
template<typename T>
213
- bool operator<<(sycl::stream&, const complex<T>&);
213
+ const sycl::stream& operator<<(sycl::stream&, const complex<T>&);
214
+
215
+ // Note: The below << and >> operator with basic_ostream and basic_istream
216
+ // are host-only.
217
+ template<class T, class charT, class traits>
218
+ std::basic_ostream<charT, traits>&
219
+ operator<<(std::basic_ostream<charT, traits>&, const complex<T>&);
220
+
221
+ template<class T, class charT, class traits>
222
+ std::basic_istream<charT, traits>&
223
+ operator>>(std::basic_istream<charT, traits>&, const complex<T>&);
214
224
215
225
} // namespace oneapi
216
226
} // namespace ext
@@ -300,8 +310,12 @@ the decimal and an imaginary component equal to 0.
300
310
|Compares complex number x and decimal y and returns true if they are different, otherwise false.
301
311
|`gencomplex operator!=(const genfloat& x, const gencomplex& y);`
302
312
|Compares decimal x and complex number y and returns true if they are different, otherwise false.
303
- |`const stream& operator<<(sycl::stream& x, const gencomplex y);`
304
- |Streams the complex number x in the format "(real,imaginary)" into `sycl::stream` x and return the result.
313
+ |`const sycl::stream& operator<<(sycl::stream& x, const gencomplex& y);`
314
+ |Streams the complex number y in the format "(real,imaginary)" into `sycl::stream` x and return the result.
315
+ |`std::basic_ostream& operator<<(std::basic_ostream& x, const gencomplex& y);`
316
+ |Streams the complex number y in the format "(real,imaginary)" into `std::basic_ostream` x and return the result. This is only available for the host.
317
+ |`std::basic_istream& operator>>(std::basic_istream&, const gencomplex& y);`
318
+ |Streams the string given in the format "(real,imaginary)" into complex number y. This is only available for the host.
305
319
|===
306
320
307
321
0 commit comments