Skip to content

Commit bcb15ba

Browse files
author
aidan.belton
committed
Update based on feedback
1 parent d54a484 commit bcb15ba

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

sycl/doc/extensions/proposed/sycl_ext_oneapi_complex_marray.asciidoc

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
= sycl_ext_oneapi_complex
1+
= sycl_ext_oneapi_complex_marray
22

33
:source-highlighter: coderay
44
:coderay-linenums-mode: table
@@ -69,7 +69,7 @@ values, and construct complex marrays.
6969

7070
This extension provides a feature-test macro as described in the core SYCL
7171
specification. An implementation supporting this extension must predefine the
72-
macro `SYCL_EXT_ONEAPI_MARRAY_COMPLEX` to one of the values defined in the table
72+
macro `SYCL_EXT_ONEAPI_COMPLEX_MARRAY` to one of the values defined in the table
7373
below. Applications can test for the existence of this macro to determine if
7474
the implementation supports this feature, or applications can test the macro's
7575
value to determine which of the extension's features the implementation
@@ -90,7 +90,9 @@ The `marray` class is specialized for the `sycl::ext::oneapi::complex`
9090
class. The user interface of the `marray<sycl::ext::oneapi::complex, {N}>`
9191
class is similar to the SYCL-2020 generic `marray` interface. Some logical,
9292
bitwise, and arithmetic operators are deleted for the complex class as there is
93-
no equivalent.
93+
no equivalent. The marray specialization builds on the
94+
`sycl::ext::oneapi::complex` class, therfore this extension is dependent on
95+
link:sycl_ext_oneapi_complex.asciidoc[sycl_ext_oneapi_complex].
9496

9597
The marray complex specialization is trivially copyable, and the type trait
9698
`is_device_copyable` should resolve to `std::true_type`.
@@ -228,7 +230,7 @@ namespace oneapi {
228230
```
229231

230232
The list of deleted operators are: %, %=, ++, --, +, -, &, |, ^, &=, |=, ^=,
231-
&&, ||, <<, >>, <<=, >>=, <, >, <=, >=, ~, !
233+
&&, ||, <<, >>, <<=, >>=, <, >, +<=+, >=, ~, !
232234

233235
The `make_complex_marray` free function is added to construct complex marrays from real and
234236
imaginary components. Additionally, the free functions `get_real` and
@@ -277,10 +279,10 @@ namespace oneapi {
277279

278280
// return sequence of elements of component
279281
template <class T, std::size_t NumElements, std::size_t... I>
280-
T get_real(const marray<sycl::ext::oneapi::complex<T>, NumElements> &input, std::integer_sequence<std::size_t, I...> int_seq);
282+
marray<T, int_seq::size()> get_real(const marray<sycl::ext::oneapi::complex<T>, NumElements> &input, std::integer_sequence<std::size_t, I...> int_seq);
281283

282284
template <class T, std::size_t NumElements, std::size_t... I>
283-
T get_imag(const marray<sycl::ext::oneapi::complex<T>, NumElements> &input, std::integer_sequence<std::size_t, I...> int_seq);
285+
marray<T, int_seq::size()> get_imag(const marray<sycl::ext::oneapi::complex<T>, NumElements> &input, std::integer_sequence<std::size_t, I...> int_seq);
284286

285287
// Set
286288

@@ -307,7 +309,7 @@ namespace oneapi {
307309
} // namespace sycl
308310
```
309311

310-
The class `sycl::oneapi::marray<complex<T>, N>`, has specializations
312+
The class `sycl::ext::oneapi::marray<sycl::ext::oneapi::complex<T>, N>`, has specializations
311313
of `T`; `float`, `double`, and `sycl::half` defined.
312314

313315
```C++
@@ -316,22 +318,23 @@ namespace ext {
316318
namespace oneapi {
317319

318320
template <std::size_t NumElements>
319-
class marray<double, NumElements>;
321+
class marray<sycl::ext::oneapi::complex<double>, NumElements>;
320322

321323
template <std::size_t NumElements>
322-
class marray<float, NumElements>;
324+
class marray<sycl::ext::oneapi::complex<float>, NumElements>;
323325

324326
template <std::size_t NumElements>
325-
class marray<sycl::half, NumElements>;
327+
class marray<sycl::ext::oneapi::complex<sycl::half>, NumElements>;
326328

327329
} // namespace oneapi
328330
} // namespace ext
329331
} // namespace sycl
330332
```
331333

332334
The generic type `mgencomplex` is defined as types
333-
`marray<complex<double>, {N}>`, `complex<complex<float>, {N}>`,
334-
`complex<complex<sycl::half>, {N}>`.
335+
`marray<sycl::ext::oneapi::complex<double>, {N}>`,
336+
`marray<sycl::ext::oneapi::complex<float>, {N}>`,
337+
`marray<sycl::ext::oneapi::complex<sycl::half>, {N}>`.
335338

336339
The table below shows the free functions operating on the `marray` complex
337340
specialized class. No table is provided for the `marray` class as only
@@ -376,7 +379,7 @@ functions are removed and the underlying function defintion stays the same.
376379
|Set the real value of element idx in x to the decimal number y.
377380
|`void set_imag(mgencomplex& x, std::size_t idx, const genfloat& y);`
378381
|Set the imaginary value of element idx in x to the decimal number y.
379-
382+
|===
380383

381384
=== Mathematical operations
382385

0 commit comments

Comments
 (0)