Skip to content

Commit bc3c4c8

Browse files
committed
Change int to size_t
1 parent e1c06d4 commit bc3c4c8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sycl/doc/extensions/proposed/sycl_ext_oneapi_device_index.asciidoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ a@
100100
----
101101
class device {
102102
// ...
103-
int ext_oneapi_to_index() const;
104-
static device ext_oneapi_from_index(int index);
103+
size_t ext_oneapi_to_index() const;
104+
static device ext_oneapi_from_index(size_t index);
105105
};
106106
----
107107
|====
@@ -113,7 +113,7 @@ class device {
113113
a@
114114
[source,c++]
115115
----
116-
int ext_oneapi_to_index() const;
116+
size_t ext_oneapi_to_index() const;
117117
----
118118
|====
119119

@@ -131,7 +131,7 @@ not a root device.
131131
a@
132132
[source,c++]
133133
----
134-
static device ext_oneapi_from_index(int index);
134+
static device ext_oneapi_from_index(size_t index);
135135
----
136136
|====
137137

@@ -155,7 +155,7 @@ int main() {
155155
sycl::device d1; // Get the default device.
156156
// There is no guarantee this has index 0.
157157
158-
int index = d1.ext_oneapi_to_index();
158+
size_t index = d1.ext_oneapi_to_index();
159159
sycl::device d2 = sycl::device::ext_oneapi_from_index(index);
160160
assert(d1 == d2);
161161
}

0 commit comments

Comments
 (0)