@@ -79,7 +79,7 @@ void submit_host_task(sycl::handler& cgh, sycl::queue& queue, Functor functor,
79
79
80
80
template <typename Functor, typename ... CaptureOnlyAcc>
81
81
void submit_host_task_with_acc (sycl::handler& cgh, sycl::queue& queue, Functor functor,
82
- sycl::accessor<std::uint8_t > workspace_placeholder_acc ,
82
+ sycl::accessor<std::uint8_t > workspace_acc ,
83
83
CaptureOnlyAcc... capture_only_accessors) {
84
84
// Only capture the accessors to ensure the dependencies are properly
85
85
// handled. The accessors's pointer have already been set to the native
@@ -88,12 +88,12 @@ void submit_host_task_with_acc(sycl::handler& cgh, sycl::queue& queue, Functor f
88
88
// specification but should be true for all the implementations. This
89
89
// assumption avoids the overhead of resetting the pointer of all data
90
90
// handles for each enqueued command.
91
- cgh.host_task ([functor, queue, workspace_placeholder_acc,
92
- capture_only_accessors...](sycl::interop_handle ih) {
93
- auto unused = std::make_tuple (capture_only_accessors...);
94
- (void )unused;
95
- functor (ih, workspace_placeholder_acc );
96
- });
91
+ cgh.host_task (
92
+ [functor, queue, workspace_acc, capture_only_accessors...](sycl::interop_handle ih) {
93
+ auto unused = std::make_tuple (capture_only_accessors...);
94
+ (void )unused;
95
+ functor (ih, workspace_acc );
96
+ });
97
97
}
98
98
99
99
template <typename Functor, typename ... CaptureOnlyAcc>
@@ -137,7 +137,7 @@ void submit_native_command_ext(sycl::handler& cgh, sycl::queue& queue, Functor f
137
137
template <typename Functor, typename ... CaptureOnlyAcc>
138
138
void submit_native_command_ext_with_acc (sycl::handler& cgh, sycl::queue& queue, Functor functor,
139
139
const std::vector<sycl::event>& dependencies,
140
- sycl::accessor<std::uint8_t > workspace_placeholder_acc ,
140
+ sycl::accessor<std::uint8_t > workspace_acc ,
141
141
CaptureOnlyAcc... capture_only_accessors) {
142
142
// Only capture the accessors to ensure the dependencies are properly
143
143
// handled. The accessors's pointer have already been set to the native
@@ -147,8 +147,7 @@ void submit_native_command_ext_with_acc(sycl::handler& cgh, sycl::queue& queue,
147
147
// assumption avoids the overhead of resetting the pointer of all data
148
148
// handles for each enqueued command.
149
149
#ifdef SYCL_EXT_ONEAPI_ENQUEUE_NATIVE_COMMAND
150
- cgh.ext_codeplay_enqueue_native_command ([functor, queue, dependencies,
151
- workspace_placeholder_acc,
150
+ cgh.ext_codeplay_enqueue_native_command ([functor, queue, dependencies, workspace_acc,
152
151
capture_only_accessors...](sycl::interop_handle ih) {
153
152
auto unused = std::make_tuple (capture_only_accessors...);
154
153
(void )unused;
@@ -166,22 +165,21 @@ void submit_native_command_ext_with_acc(sycl::handler& cgh, sycl::queue& queue,
166
165
for (auto event : dependencies) {
167
166
event.wait ();
168
167
}
169
- functor (ih, workspace_placeholder_acc );
168
+ functor (ih, workspace_acc );
170
169
});
171
170
#else
172
171
(void )dependencies;
173
- submit_host_task_with_acc (cgh, queue, functor, workspace_placeholder_acc,
174
- capture_only_accessors...);
172
+ submit_host_task_with_acc (cgh, queue, functor, workspace_acc, capture_only_accessors...);
175
173
#endif
176
174
}
177
175
178
176
// / Helper submit functions to capture all accessors from the generic containers
179
177
// / \p other_containers and ensure the dependencies of buffers are respected.
180
178
// / The accessors are not directly used as the underlying data pointer has
181
179
// / already been captured in previous functions.
182
- // / \p workspace_placeholder_acc is a placeholder accessor that will be bound to
183
- // / the cgh if not empty and given to the functor as a last argument.
184
- // / \p UseWorkspace must be true to use the placeholder accessor .
180
+ // / \p workspace_buffer is an optional buffer. Its accessor will be given to the
181
+ // / functor as a last argument if \p UseWorkspace is true .
182
+ // / \p UseWorkspace must be true to use the given \p workspace_buffer .
185
183
// / \p UseEnqueueNativeCommandExt controls whether host_task are used or the
186
184
// / extension ext_codeplay_enqueue_native_command is used to launch tasks. The
187
185
// / extension should only be used for asynchronous functions using native
0 commit comments