Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 0f5fb49

Browse files
authored
[SYCL] Eliminate usages of _class aliases (#449)
1 parent 0428b73 commit 0f5fb49

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

SYCL/Basic/platform.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ using namespace cl::sycl;
1616

1717
int main() {
1818
int i = 1;
19-
vector_class<platform> openclPlatforms;
19+
std::vector<platform> openclPlatforms;
2020
for (const auto &plt : platform::get_platforms()) {
2121
std::cout << "Platform " << i++
2222
<< " is available: " << ((plt.is_host()) ? "host: " : "OpenCL: ")
@@ -34,9 +34,9 @@ int main() {
3434
{
3535
std::cout << "move constructor" << std::endl;
3636
platform Platform(platformA);
37-
size_t hash = hash_class<platform>()(Platform);
37+
size_t hash = std::hash<platform>()(Platform);
3838
platform MovedPlatform(std::move(Platform));
39-
assert(hash == hash_class<platform>()(MovedPlatform));
39+
assert(hash == std::hash<platform>()(MovedPlatform));
4040
assert(platformA.is_host() == MovedPlatform.is_host());
4141
if (!platformA.is_host() &&
4242
platformA.get_backend() == cl::sycl::backend::opencl) {
@@ -46,10 +46,10 @@ int main() {
4646
{
4747
std::cout << "move assignment operator" << std::endl;
4848
platform Platform(platformA);
49-
size_t hash = hash_class<platform>()(Platform);
49+
size_t hash = std::hash<platform>()(Platform);
5050
platform WillMovedPlatform(platformB);
5151
WillMovedPlatform = std::move(Platform);
52-
assert(hash == hash_class<platform>()(WillMovedPlatform));
52+
assert(hash == std::hash<platform>()(WillMovedPlatform));
5353
assert(platformA.is_host() == WillMovedPlatform.is_host());
5454
if (!platformA.is_host() &&
5555
platformA.get_backend() == cl::sycl::backend::opencl) {
@@ -59,21 +59,21 @@ int main() {
5959
{
6060
std::cout << "copy constructor" << std::endl;
6161
platform Platform(platformA);
62-
size_t hash = hash_class<platform>()(Platform);
62+
size_t hash = std::hash<platform>()(Platform);
6363
platform PlatformCopy(Platform);
64-
assert(hash == hash_class<platform>()(Platform));
65-
assert(hash == hash_class<platform>()(PlatformCopy));
64+
assert(hash == std::hash<platform>()(Platform));
65+
assert(hash == std::hash<platform>()(PlatformCopy));
6666
assert(Platform == PlatformCopy);
6767
assert(Platform.is_host() == PlatformCopy.is_host());
6868
}
6969
{
7070
std::cout << "copy assignment operator" << std::endl;
7171
platform Platform(platformA);
72-
size_t hash = hash_class<platform>()(Platform);
72+
size_t hash = std::hash<platform>()(Platform);
7373
platform WillPlatformCopy(platformB);
7474
WillPlatformCopy = Platform;
75-
assert(hash == hash_class<platform>()(Platform));
76-
assert(hash == hash_class<platform>()(WillPlatformCopy));
75+
assert(hash == std::hash<platform>()(Platform));
76+
assert(hash == std::hash<platform>()(WillPlatformCopy));
7777
assert(Platform == WillPlatformCopy);
7878
assert(Platform.is_host() == WillPlatformCopy.is_host());
7979
}

SYCL/Plugin/level_zero_batch_event_status.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
int main(void) {
4949
sycl::default_selector ds{};
5050
sycl::queue q{ds};
51-
sycl::vector_class<sycl::event> events(10);
51+
std::vector<sycl::event> events(10);
5252

5353
sycl::event ev1 = q.submit([&](sycl::handler &cgh) {
5454
cgh.depends_on(events);

0 commit comments

Comments
 (0)