Skip to content

Commit 1bbed53

Browse files
committed
Temporarily cancelled the changes in sycl/stl.hpp - will be moved to separate PR
1 parent 8c32710 commit 1bbed53

File tree

1 file changed

+19
-37
lines changed

1 file changed

+19
-37
lines changed

sycl/include/CL/sycl/stl.hpp

Lines changed: 19 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -22,52 +22,34 @@
2222
__SYCL_INLINE_NAMESPACE(cl) {
2323
namespace sycl {
2424

25-
#ifdef _WIN32
26-
namespace detail {
27-
// SYCL library is designed such a way that STL objects cross DLL boundary,
28-
// which is not guaranteed to work and considered not safe in general.
29-
// Only using same dynamic C++ runtime library for sycl[d].dll and for
30-
// the application using sycl[d].dll is guaranteed to work properly.
31-
inline constexpr bool isMSVCDynamicCXXRuntime() {
32-
// The options /MD and /MDd that make the code to use dynamic runtime also
33-
// define the _DLL macro.
34-
#ifdef _DLL
35-
return true;
36-
#else
37-
return false;
38-
#endif
39-
}
40-
static_assert(isMSVCDynamicCXXRuntime(),
41-
"SYCL library is designed to work with dynamic C++ runtime, "
42-
"please use /MD or /MDd switches.");
43-
} // namespace detail
44-
#endif // _WIN32
25+
template < class T, class Alloc = std::allocator<T> >
26+
using vector_class = std::vector<T, Alloc>;
4527

46-
template <class T, class Alloc = std::allocator<T>>
47-
using vector_class = std::vector<T, Alloc>;
28+
using string_class = std::string;
4829

49-
using string_class = std::string;
30+
template <class Sig>
31+
using function_class = std::function<Sig>;
5032

51-
template <class Sig> using function_class = std::function<Sig>;
33+
using mutex_class = std::mutex;
5234

53-
using mutex_class = std::mutex;
35+
template <class T, class Deleter = std::default_delete<T>>
36+
using unique_ptr_class = std::unique_ptr<T, Deleter>;
5437

55-
template <class T, class Deleter = std::default_delete<T>>
56-
using unique_ptr_class = std::unique_ptr<T, Deleter>;
38+
template <class T>
39+
using shared_ptr_class = std::shared_ptr<T>;
5740

58-
template <class T> using shared_ptr_class = std::shared_ptr<T>;
41+
template <class T>
42+
using weak_ptr_class = std::weak_ptr<T>;
5943

60-
template <class T> using weak_ptr_class = std::weak_ptr<T>;
44+
template <class T>
45+
using hash_class = std::hash<T>;
6146

62-
template <class T> using hash_class = std::hash<T>;
63-
64-
using exception_ptr_class = std::exception_ptr;
65-
66-
template <typename T, typename... ArgsT>
67-
unique_ptr_class<T> make_unique_ptr(ArgsT &&... Args) {
68-
return unique_ptr_class<T>(new T(std::forward<ArgsT>(Args)...));
69-
}
47+
using exception_ptr_class = std::exception_ptr;
7048

49+
template <typename T, typename... ArgsT>
50+
unique_ptr_class<T> make_unique_ptr(ArgsT &&... Args) {
51+
return unique_ptr_class<T>(new T(std::forward<ArgsT>(Args)...));
52+
}
7153
} // sycl
7254
} // cl
7355

0 commit comments

Comments
 (0)