File tree 2 files changed +8
-0
lines changed 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,8 @@ template <int Dimensions = 1> class group {
133
133
#endif
134
134
}
135
135
136
+ size_t get_local_id (int dimention) const { return get_local_id ()[dimention]; }
137
+
136
138
size_t get_local_linear_id () const {
137
139
return get_local_linear_id_impl<Dimensions>();
138
140
}
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ int main() {
33
33
34
34
try {
35
35
one_dim.get_local_id ();
36
+ assert (one_dim.get_local_id (0 ) == one_dim.get_local_id ()[0 ]);
36
37
assert (0 ); // get_local_id() is not implemented on host device
37
38
} catch (cl::sycl::runtime_error) {
38
39
}
@@ -64,6 +65,8 @@ int main() {
64
65
65
66
try {
66
67
two_dim.get_local_id ();
68
+ assert (two_dim.get_local_id (0 ) == two_dim.get_local_id ()[0 ]);
69
+ assert (two_dim.get_local_id (1 ) == two_dim.get_local_id ()[1 ]);
67
70
assert (0 ); // get_local_id() is not implemented on host device
68
71
} catch (cl::sycl::runtime_error) {
69
72
}
@@ -101,6 +104,9 @@ int main() {
101
104
102
105
try {
103
106
three_dim.get_local_id ();
107
+ assert (three_dim.get_local_id (0 ) == three_dim.get_local_id ()[0 ]);
108
+ assert (three_dim.get_local_id (1 ) == three_dim.get_local_id ()[1 ]);
109
+ assert (three_dim.get_local_id (2 ) == three_dim.get_local_id ()[2 ]);
104
110
assert (0 ); // get_local_id() is not implemented on host device
105
111
} catch (cl::sycl::runtime_error) {
106
112
}
You can’t perform that action at this time.
0 commit comments