Skip to content

Commit 7147da4

Browse files
committed
Reorder required implementation to follow the complex order and reorder the deleted operators to follow the C++ order
1 parent 3b35704 commit 7147da4

File tree

1 file changed

+35
-36
lines changed

1 file changed

+35
-36
lines changed

sycl/doc/extensions/experimental/sycl_ext_oneapi_complex.asciidoc

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -269,24 +269,23 @@ public:
269269
/// Divides and assigns complex number rhs to marray lhs.
270270
friend marray &operator /=(marray &lhs, const value_type &rhs);
271271

272-
/// Returns a copy of the input marray.
273-
friend marray operator +(const marray &lhs);
274-
/// Negates each element of the input marray.
275-
friend marray operator -(const marray &lhs);
276-
277272
/// Adds marray rhs and marray lhs and returns the result.
278273
friend marray operator +(const marray &lhs, const marray &rhs);
279274
/// Adds complex number rhs and marray lhs and returns the result.
280275
friend marray operator +(const marray &lhs, const value_type &rhs);
281276
/// Adds marray rhs and complex number lhs and returns the result.
282277
friend marray operator +(const value_type &lhs, const marray &rhs);
278+
/// Returns a copy of the input marray.
279+
friend marray operator +(const marray &lhs);
283280

284281
/// Subtracts marray rhs and marray lhs and returns the result.
285282
friend marray operator -(const marray &lhs, const marray &rhs);
286283
/// Subtracts complex number rhs and marray lhs and returns the result.
287284
friend marray operator -(const marray &lhs, const value_type &rhs);
288285
/// Subtracts marray rhs and complex number lhs and returns the result.
289286
friend marray operator -(const value_type &lhs, const marray &rhs);
287+
/// Negates each element of the input marray.
288+
friend marray operator -(const marray &lhs);
290289

291290
/// Mulitplies marray rhs and marray lhs and returns the result.
292291
friend marray operator *(const marray &lhs, const marray &rhs);
@@ -318,25 +317,42 @@ public:
318317

319318
/* ... */
320319

321-
friend marray operator %(const marray &lhs, const marray &rhs) = delete;
322-
friend marray operator %(const marray &lhs, const value_type &rhs) = delete;
323-
friend marray operator %(const value_type &lhs, const marray &rhs) = delete;
324-
325320
friend marray &operator %=(marray &lhs, const marray &rhs) = delete;
326321
friend marray &operator %=(marray &lhs, const value_type &rhs) = delete;
327322

328-
friend marray operator ++(marray &lhs, int) = delete;
323+
friend marray &operator &=(marray &lhs, const marray &rhs) = delete;
324+
friend marray &operator &=(marray &lhs, const value_type &rhs) = delete;
325+
326+
friend marray &operator |=(marray &lhs, const marray &rhs) = delete;
327+
friend marray &operator |=(marray &lhs, const value_type &rhs) = delete;
328+
329+
friend marray &operator ^=(marray &lhs, const marray &rhs) = delete;
330+
friend marray &operator ^=(marray &lhs, const value_type &rhs) = delete;
331+
332+
friend marray &operator <<=(marray &lhs, const marray &rhs) = delete;
333+
friend marray &operator <<=(marray &lhs, const value_type &rhs) = delete;
334+
335+
friend marray &operator >>=(marray &lhs, const marray &rhs) = delete;
336+
friend marray &operator >>=(marray &lhs, const value_type &rhs) = delete;
337+
329338
friend marray &operator ++(marray &lhs) = delete;
339+
friend marray operator ++(marray &lhs, int) = delete;
330340

331-
friend marray operator --(marray &lhs, int) = delete;
332341
friend marray &operator --(marray &lhs) = delete;
342+
friend marray operator --(marray &lhs, int) = delete;
333343

334344
friend marray &operator +=(marray &lhs) = delete;
335345
friend marray operator +=(marray &lhs, int) = delete;
336346

337347
friend marray &operator -=(marray &lhs) = delete;
338348
friend marray operator -=(marray &lhs, int) = delete;
339349

350+
friend marray operator %(const marray &lhs, const marray &rhs) = delete;
351+
friend marray operator %(const marray &lhs, const value_type &rhs) = delete;
352+
friend marray operator %(const value_type &lhs, const marray &rhs) = delete;
353+
354+
friend marray operator ~(const marray &lhs) = delete;
355+
340356
friend marray operator &(const marray &lhs, const marray &rhs) = delete;
341357
friend marray operator &(const marray &lhs, const value_type &rhs) = delete;
342358
friend marray operator &(const value_type &lhs, const marray &rhs) = delete;
@@ -349,15 +365,6 @@ public:
349365
friend marray operator ^(const marray &lhs, const value_type &rhs) = delete;
350366
friend marray operator ^(const value_type &lhs, const marray &rhs) = delete;
351367

352-
friend marray &operator &=(marray &lhs, const marray &rhs) = delete;
353-
friend marray &operator &=(marray &lhs, const value_type &rhs) = delete;
354-
355-
friend marray &operator |=(marray &lhs, const marray &rhs) = delete;
356-
friend marray &operator |=(marray &lhs, const value_type &rhs) = delete;
357-
358-
friend marray &operator ^=(marray &lhs, const marray &rhs) = delete;
359-
friend marray &operator ^=(marray &lhs, const value_type &rhs) = delete;
360-
361368
friend marray<bool, NumElements> operator <<(const marray &lhs, const marray &rhs) = delete;
362369
friend marray<bool, NumElements> operator <<(const marray &lhs, const value_type &rhs) = delete;
363370
friend marray<bool, NumElements> operator <<(const value_type &lhs, const marray &rhs) = delete;
@@ -366,11 +373,15 @@ public:
366373
friend marray<bool, NumElements> operator >>(const marray &lhs, const value_type &rhs) = delete;
367374
friend marray<bool, NumElements> operator >>(const value_type &lhs, const marray &rhs) = delete;
368375

369-
friend marray &operator <<=(marray &lhs, const marray &rhs) = delete;
370-
friend marray &operator <<=(marray &lhs, const value_type &rhs) = delete;
376+
friend marray<bool, NumElements> operator !(const marray &lhs) = delete;
371377

372-
friend marray &operator >>=(marray &lhs, const marray &rhs) = delete;
373-
friend marray &operator >>=(marray &lhs, const value_type &rhs) = delete;
378+
friend marray<bool, NumElements> operator &&(const marray &lhs, const marray &hhs) = delete;
379+
friend marray<bool, NumElements> operator &&(const marray &lhs, const value_type &rhs) = delete;
380+
friend marray<bool, NumElements> operator &&(const value_type &lhs, const marray &rhs) = delete;
381+
382+
friend marray<bool, NumElements> operator ||(const marray &lhs, const marray &rhs) = delete;
383+
friend marray<bool, NumElements> operator ||(const marray &lhs, const value_type &rhs) = delete;
384+
friend marray<bool, NumElements> operator ||(const value_type &lhs, const marray &rhs) = delete;
374385

375386
friend marray<bool, NumElements> operator <(const marray &lhs, const marray &rhs) = delete;
376387
friend marray<bool, NumElements> operator <(const marray &lhs, const value_type &rhs) = delete;
@@ -387,18 +398,6 @@ public:
387398
friend marray<bool, NumElements> operator >=(const marray &lhs, const marray &rhs) = delete;
388399
friend marray<bool, NumElements> operator >=(const marray &lhs, const value_type &rhs) = delete;
389400
friend marray<bool, NumElements> operator >=(const value_type &lhs, const marray &rhs) = delete;
390-
391-
friend marray<bool, NumElements> operator &&(const marray &lhs, const marray &hhs) = delete;
392-
friend marray<bool, NumElements> operator &&(const marray &lhs, const value_type &rhs) = delete;
393-
friend marray<bool, NumElements> operator &&(const value_type &lhs, const marray &rhs) = delete;
394-
395-
friend marray<bool, NumElements> operator ||(const marray &lhs, const marray &rhs) = delete;
396-
friend marray<bool, NumElements> operator ||(const marray &lhs, const value_type &rhs) = delete;
397-
friend marray<bool, NumElements> operator ||(const value_type &lhs, const marray &rhs) = delete;
398-
399-
friend marray operator ~(const marray &lhs) = delete;
400-
401-
friend marray<bool, NumElements> operator !(const marray &lhs) = delete;
402401
};
403402

404403
} // namespace sycl

0 commit comments

Comments
 (0)