Skip to content

Commit f4525e9

Browse files
[SYCL] Remove _CODELOC* macro from API (#9847)
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
1 parent 9ad2588 commit f4525e9

File tree

6 files changed

+623
-576
lines changed

6 files changed

+623
-576
lines changed

sycl/doc/PreprocessorMacros.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ This file describes macros that have effect on SYCL compiler and run-time.
1919
the underlying pointer types return pointers without any additional qualifiers
2020
so it's disabled by default.
2121

22-
- **DISABLE_SYCL_INSTRUMENTATION_METADATA**
23-
24-
This macro is used to disable passing of code location information to public
25-
methods.
26-
2722
- **SYCL2020_DISABLE_DEPRECATION_WARNINGS**
2823

2924
Disables warnings coming from usage of SYCL 1.2.1 APIs, that are deprecated in

sycl/include/sycl/detail/common.hpp

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
#include <string>
1919

2020
// Default signature enables the passing of user code location information to
21-
// public methods as a default argument. If the end-user wants to disable the
22-
// code location information, they must compile the code with
23-
// -DDISABLE_SYCL_INSTRUMENTATION_METADATA flag
21+
// public methods as a default argument.
2422
namespace sycl {
2523
__SYCL_INLINE_VER_NAMESPACE(_V1) {
2624
namespace detail {
@@ -96,31 +94,6 @@ struct code_location {
9694
unsigned long MColumnNo;
9795
};
9896

99-
// The C++ FE may instrument user calls with code location metadata.
100-
// If it does then that will appear as an extra last argument.
101-
// Having _TWO_ mid-param #ifdefs makes the functions very difficult to read.
102-
// Here we simplify the &CodeLoc declaration to be _CODELOCPARAM(&CodeLoc) and
103-
// _CODELOCARG(&CodeLoc).
104-
105-
#ifndef DISABLE_SYCL_INSTRUMENTATION_METADATA
106-
#define _CODELOCONLYPARAM(a) \
107-
const ::sycl::detail::code_location a = \
108-
::sycl::detail::code_location::current()
109-
#define _CODELOCPARAM(a) \
110-
, const ::sycl::detail::code_location a = \
111-
::sycl::detail::code_location::current()
112-
#define _CODELOCPARAMDEF(a) , const ::sycl::detail::code_location a
113-
114-
#define _CODELOCARG(a)
115-
#define _CODELOCFW(a) , a
116-
#else
117-
#define _CODELOCONLYPARAM(a)
118-
#define _CODELOCPARAM(a)
119-
120-
#define _CODELOCARG(a) const ::sycl::detail::code_location a = {}
121-
#define _CODELOCFW(a)
122-
#endif
123-
12497
/// @brief Data type that manages the code_location information in TLS
12598
/// @details As new SYCL features are added, they all enable the propagation of
12699
/// the code location information where the SYCL API was called by the

0 commit comments

Comments
 (0)