Skip to content

Commit e5e57b6

Browse files
[SYCL][DOC] Move device_global to experimental namespace (#5686)
These changes moves device_global and the associated properties into the `sycl::ext::oneapi::experimental` namespace. Signed-off-by: Steffen Larsen <steffen.larsen@intel.com>
1 parent 104e439 commit e5e57b6

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

sycl/doc/design/DeviceGlobal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void func(sycl::queue q) {
3737
Device global variables, by contrast, are referenced by their address:
3838

3939
```
40-
sycl::ext::oneapi::device_global<int> dev_var;
40+
sycl::ext::oneapi::experimental::device_global<int> dev_var;
4141
4242
void func(sycl::queue q) {
4343
int val = 42;

sycl/doc/extensions/proposed/sycl_ext_oneapi_device_global.asciidoc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ It also depends on the `SYCL_EXT_ONEAPI_PROPERTY_LIST` extension.
8585

8686
[NOTE]
8787
====
88-
In this document, we use `device_global` to indicate the proposed `sycl::ext::oneapi::device_global`.
88+
In this document, we use `device_global` to indicate the proposed `sycl::ext::oneapi::experimental::device_global`.
8989
====
9090

9191
The purpose of this document is to clearly describe and specify `device_global` and related
@@ -112,7 +112,7 @@ struct MyClass {
112112
bool flag;
113113
};
114114
115-
using namespace sycl::ext::oneapi;
115+
using namespace sycl::ext::oneapi::experimental;
116116
117117
device_global<MyClass> dm1;
118118
static device_global<int[4]> dm2;
@@ -171,7 +171,7 @@ A `device_global` on a given device maintains its state (address of the allocati
171171

172172
[source,c++]
173173
----
174-
namespace sycl::ext::oneapi {
174+
namespace sycl::ext::oneapi::experimental {
175175
template <typename T, typename PropertyListT = property_list<>>
176176
class device_global {
177177
...
@@ -201,7 +201,7 @@ The section below and the table following describe the constructors, member func
201201

202202
[source,c++]
203203
----
204-
namespace sycl::ext::oneapi {
204+
namespace sycl::ext::oneapi::experimental {
205205
206206
template <typename T, typename PropertyListT = property_list<>>
207207
class device_global {
@@ -269,7 +269,7 @@ public:
269269
static constexpr /*unspecified*/ get_property();
270270
};
271271
272-
} // namespace sycl::ext::oneapi
272+
} // namespace sycl::ext::oneapi::experimental
273273
----
274274

275275
[frame="topbot",options="header"]
@@ -378,7 +378,7 @@ template<typename propertyT>
378378
static constexpr bool has_property();
379379
----
380380
| Returns true if the `PropertyListT` contains the property specified by `propertyT`. Returns false if it does not.
381-
Available only if `sycl::is_property_of_v<propertyT, sycl::ext::oneapi::device_global>` is true.
381+
Available only if `sycl::is_property_of_v<propertyT, sycl::ext::oneapi::experimental::device_global>` is true.
382382

383383
// --- ROW BREAK ---
384384
a|
@@ -389,7 +389,7 @@ static constexpr auto get_property();
389389
----
390390
| Returns an object of the class used to represent the value of property `propertyT`.
391391
Must produce a compiler diagnostic if `PropertyListT` does not contain a `propertyT` property.
392-
Available only if `sycl::is_property_of_v<propertyT, sycl::ext::oneapi::device_global>` is true.
392+
Available only if `sycl::is_property_of_v<propertyT, sycl::ext::oneapi::experimental::device_global>` is true.
393393

394394
|===
395395

@@ -439,7 +439,7 @@ The following example illustrates some of these restrictions:
439439
[source, c++]
440440
----
441441
#include <sycl/sycl.hpp>
442-
using namespace sycl::ext::oneapi;
442+
using namespace sycl::ext::oneapi::experimental;
443443
444444
device_global<int> a; // OK
445445
static device_global<int> b; // OK
@@ -489,7 +489,7 @@ parameter as shown in this example:
489489

490490
[source,c++]
491491
----
492-
using namespace sycl::ext::oneapi;
492+
using namespace sycl::ext::oneapi::experimental;
493493
494494
device_global<MyClass, property_list_t<device_image_scope::value_t>> dm1;
495495
device_global<int[4], property_list_t<host_access::value_t<host_access::access::read>> dm2;
@@ -500,7 +500,7 @@ following table describes their effect.
500500

501501
[source,c++]
502502
----
503-
namespace sycl::ext::oneapi {
503+
namespace sycl::ext::oneapi::experimental {
504504
505505
struct device_image_scope {
506506
using value_t = property_value<device_image_scope>;
@@ -542,7 +542,7 @@ inline constexpr init_mode::value_t<T> init_mode_v;
542542
template<bool Enable>
543543
inline constexpr implement_in_csr::value_t<Enable> implement_in_csr_v;
544544
545-
} // namespace sycl::ext::oneapi
545+
} // namespace sycl::ext::oneapi::experimental
546546
----
547547

548548
[frame="topbot",options="header"]
@@ -718,13 +718,13 @@ For example:
718718
```c++
719719
// In one translation unit
720720
#include <sycl/sycl.hpp>
721-
using namespace sycl::ext::oneapi;
721+
using namespace sycl::ext::oneapi::experimental;
722722

723723
SYCL_EXTERNAL device_global<int> Foo; // definition (also a declaration)
724724

725725
// In another translation unit
726726
#include <sycl/sycl.hpp>
727-
using namespace sycl::ext::oneapi;
727+
using namespace sycl::ext::oneapi::experimental;
728728
using namespace sycl;
729729

730730
SYCL_EXTERNAL extern device_global<int> Foo; // declaration
@@ -1076,7 +1076,7 @@ A sketch of the anticipated constructor interface is:
10761076

10771077
[source,c++]
10781078
----
1079-
namespace sycl::ext::oneapi {
1079+
namespace sycl::ext::oneapi::experimental {
10801080
10811081
template <typename T, typename PropertyListT = property_list<>>
10821082
class device_global {
@@ -1107,7 +1107,7 @@ The example below creates two global namespace scope `device_global` objects nam
11071107
[source,c++]
11081108
----
11091109
using namespace sycl;
1110-
using namespace sycl::ext::oneapi;
1110+
using namespace sycl::ext::oneapi::experimental;
11111111
11121112
device_global<MyClass> dm1;
11131113
static device_global<int[4]> dm2{1, 3, 5, 7}; // Requires C++20 to be enabled

0 commit comments

Comments
 (0)