9
9
#pragma once
10
10
11
11
#include < CL/sycl/detail/common.hpp>
12
- #include < CL/sycl/detail/queue_impl.hpp>
13
12
#include < CL/sycl/device_selector.hpp>
14
13
#include < CL/sycl/exception_list.hpp>
15
14
#include < CL/sycl/info/info_desc.hpp>
@@ -33,8 +32,12 @@ namespace sycl {
33
32
// Forward declaration
34
33
class context ;
35
34
class device ;
35
+ namespace detail {
36
+ class queue_impl ;
37
+ }
36
38
37
39
class __SYCL_DEPRECATED__ ordered_queue {
40
+
38
41
public:
39
42
explicit ordered_queue (const property_list &propList = {})
40
43
: ordered_queue(default_selector(), async_handler{}, propList) {}
@@ -60,10 +63,7 @@ class __SYCL_DEPRECATED__ ordered_queue {
60
63
61
64
ordered_queue (const context &syclContext,
62
65
const device_selector &deviceSelector,
63
- const property_list &propList = {})
64
- : ordered_queue(syclContext, deviceSelector,
65
- detail::getSyclObjImpl (syclContext)->get_async_handler(),
66
- propList) {}
66
+ const property_list &propList = {});
67
67
68
68
ordered_queue (const context &syclContext,
69
69
const device_selector &deviceSelector,
@@ -85,47 +85,36 @@ class __SYCL_DEPRECATED__ ordered_queue {
85
85
86
86
bool operator !=(const ordered_queue &rhs) const { return !(*this == rhs); }
87
87
88
- cl_command_queue get () const { return impl-> get (); }
88
+ cl_command_queue get () const ;
89
89
90
- context get_context () const { return impl-> get_context (); }
90
+ context get_context () const ;
91
91
92
- device get_device () const { return impl-> get_device (); }
92
+ device get_device () const ;
93
93
94
- bool is_host () const { return impl-> is_host (); }
94
+ bool is_host () const ;
95
95
96
- template <info::ordered_queue param>
97
- typename info::param_traits<info::ordered_queue, param>::return_type
98
- get_info () const {
99
- return impl->get_info <param>();
100
- }
96
+ template <info::queue param>
97
+ typename info::param_traits<info::queue, param>::return_type get_info () const ;
101
98
102
- template <typename T> event submit (T cgf) { return impl-> submit (cgf, impl ); }
99
+ template <typename T> event submit (T cgf) { return submit_impl (cgf); }
103
100
104
101
template <typename T> event submit (T cgf, ordered_queue &secondaryQueue) {
105
- return impl-> submit (cgf, impl, secondaryQueue. impl );
102
+ return submit_impl (cgf, secondaryQueue);
106
103
}
107
104
108
- void wait () { impl-> wait (); }
105
+ void wait ();
109
106
110
- void wait_and_throw () { impl-> wait_and_throw (); }
107
+ void wait_and_throw ();
111
108
112
- void throw_asynchronous () { impl-> throw_asynchronous (); }
109
+ void throw_asynchronous ();
113
110
114
- template <typename propertyT> bool has_property () const {
115
- return impl->has_property <propertyT>();
116
- }
111
+ template <typename propertyT> bool has_property () const ;
117
112
118
- template <typename propertyT> propertyT get_property () const {
119
- return impl->get_property <propertyT>();
120
- }
113
+ template <typename propertyT> propertyT get_property () const ;
121
114
122
- event memset (void *ptr, int value, size_t count) {
123
- return impl->memset (impl, ptr, value, count);
124
- }
115
+ event memset (void *ptr, int value, size_t count);
125
116
126
- event memcpy (void *dest, const void *src, size_t count) {
127
- return impl->memcpy (impl, dest, src, count);
128
- }
117
+ event memcpy (void *dest, const void *src, size_t count);
129
118
130
119
event prefetch (const void *Ptr, size_t Count) {
131
120
return submit ([=](handler &cgh) { cgh.prefetch (Ptr, Count); });
@@ -175,9 +164,13 @@ class __SYCL_DEPRECATED__ ordered_queue {
175
164
}
176
165
177
166
private:
178
- std::shared_ptr <detail::queue_impl> impl;
167
+ shared_ptr_class <detail::queue_impl> impl;
179
168
template <class Obj >
180
169
friend decltype (Obj::impl) detail::getSyclObjImpl(const Obj &SyclObject);
170
+
171
+ event submit_impl (function_class<void (handler &)> CGH);
172
+ event submit_impl (function_class<void (handler &)> CGH,
173
+ ordered_queue &secondQueue);
181
174
};
182
175
183
176
#undef __SYCL_DEPRECATED__
0 commit comments