Skip to content

Commit f7adad8

Browse files
author
Sergey Kanaev
committed
Address build issue
Signed-off-by: Sergey Kanaev <[email protected]>
1 parent ff0fccc commit f7adad8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

sycl/include/CL/sycl/queue.hpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
// or : const detail::code_location &CodeLoc = {}
3636

3737
#ifndef DISABLE_SYCL_INSTRUMENTATION_METADATA
38+
#define _CODELOCONLYPARAM(a) \
39+
const detail::code_location a = detail::code_location::current()
3840
#define _CODELOCPARAM(a) \
3941
, const detail::code_location a = detail::code_location::current()
4042

@@ -246,7 +248,7 @@ class __SYCL_EXPORT queue {
246248
/// \param CodeLoc is the code location of the submit call (default argument)
247249
/// \return a SYCL event object, which corresponds to the queue the command
248250
/// group is being enqueued on.
249-
event submit_barrier(_CODELOCPARAM(&CodeLoc)) {
251+
event submit_barrier(_CODELOCONLYPARAM(&CodeLoc)) {
250252
return submit([=](handler &CGH) { CGH.barrier(); } _CODELOCFW(CodeLoc));
251253
}
252254

@@ -270,7 +272,7 @@ class __SYCL_EXPORT queue {
270272
///
271273
/// Synchronous errors will be reported through SYCL exceptions.
272274
/// @param CodeLoc is the code location of the submit call (default argument)
273-
void wait(_CODELOCPARAM(&CodeLoc)) {
275+
void wait(_CODELOCONLYPARAM(&CodeLoc)) {
274276
_CODELOCARG(&CodeLoc)
275277

276278
wait_proxy(CodeLoc);
@@ -284,7 +286,7 @@ class __SYCL_EXPORT queue {
284286
/// construction. If no async_handler was provided then asynchronous
285287
/// exceptions will be lost.
286288
/// @param CodeLoc is the code location of the submit call (default argument)
287-
void wait_and_throw(_CODELOCPARAM(&CodeLoc)) {
289+
void wait_and_throw(_CODELOCONLYPARAM(&CodeLoc)) {
288290
_CODELOCARG(&CodeLoc);
289291

290292
wait_and_throw_proxy(CodeLoc);
@@ -706,6 +708,7 @@ class __SYCL_EXPORT queue {
706708

707709
// Clean up CODELOC and KERNELFUNC macros.
708710
#undef _CODELOCPARAM
711+
#undef _CODELOCONLYPARAM
709712
#undef _CODELOCARG
710713
#undef _CODELOCFW
711714
#undef _KERNELFUNCPARAM

0 commit comments

Comments
 (0)