Skip to content

Commit f05dd9d

Browse files
committed
Revert set changes
Signed-off-by: Larsen, Steffen <[email protected]>
1 parent ed2e777 commit f05dd9d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/platform/platform_api.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121

2222
#include "../common/common.h"
2323

24-
#include <set>
25-
2624
#define TEST_NAME platform_api
2725

2826
namespace platform_api__ {
@@ -37,9 +35,11 @@ struct DeviceHashLessT {
3735
};
3836

3937
// Checks that all devices in a vector are unique.
40-
inline bool AllDevicesUnique(const std::vector<sycl::device> &devices) {
41-
return std::set<sycl::device>{devices.begin(), devices.end()}.size() ==
42-
devices.size();
38+
inline bool AllDevicesUnique(const std::vector<sycl::device>& devices) {
39+
std::vector<sycl::device> devicesCopy = devices;
40+
std::sort(devicesCopy.begin(), devicesCopy.end(), DeviceHashLessT{});
41+
return std::unique(devicesCopy.begin(), devicesCopy.end()) ==
42+
devicesCopy.end();
4343
}
4444

4545
// Checks that all devices are in the list devices returned by the platform.

0 commit comments

Comments
 (0)