Skip to content

Commit fd064e2

Browse files
committed
Added a comment about dummy code-loc. Updated 3 deprecated shortcuts.
The 3 deprecated shortcuts accepting 'offset' actually never get code-location argument, thus removed code-loc from arguments there. Signed-off-by: Vyacheslav N Klochkov <vyacheslav.n.klochkov@intel.com>
1 parent b6f6a30 commit fd064e2

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

sycl/include/CL/sycl/queue.hpp

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -872,10 +872,10 @@ class __SYCL_EXPORT queue {
872872
template <typename KernelName = detail::auto_name, typename KernelType,
873873
int Dims>
874874
__SYCL2020_DEPRECATED("offsets are deprecated in SYCL 2020")
875-
event
876-
parallel_for_impl(range<Dims> Range, id<Dims> WorkItemOffset,
877-
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc)) {
878-
_CODELOCARG(&CodeLoc);
875+
event parallel_for_impl(range<Dims> Range, id<Dims> WorkItemOffset,
876+
_KERNELFUNCPARAM(KernelFunc)) {
877+
// Actual code location needs to be captured from KernelInfo object.
878+
const detail::code_location CodeLoc = {};
879879
return submit(
880880
[&](handler &CGH) {
881881
CGH.template parallel_for<KernelName>(Range, WorkItemOffset,
@@ -895,11 +895,10 @@ class __SYCL_EXPORT queue {
895895
template <typename KernelName = detail::auto_name, typename KernelType,
896896
int Dims>
897897
__SYCL2020_DEPRECATED("offsets are deprecated in SYCL 2020")
898-
event
899-
parallel_for_impl(range<Dims> Range, id<Dims> WorkItemOffset,
900-
event DepEvent,
901-
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc)) {
902-
_CODELOCARG(&CodeLoc);
898+
event parallel_for_impl(range<Dims> Range, id<Dims> WorkItemOffset,
899+
event DepEvent, _KERNELFUNCPARAM(KernelFunc)) {
900+
// Actual code location needs to be captured from KernelInfo object.
901+
const detail::code_location CodeLoc = {};
903902
return submit(
904903
[&](handler &CGH) {
905904
CGH.depends_on(DepEvent);
@@ -921,11 +920,11 @@ class __SYCL_EXPORT queue {
921920
template <typename KernelName = detail::auto_name, typename KernelType,
922921
int Dims>
923922
__SYCL2020_DEPRECATED("offsets are deprecated in SYCL 2020")
924-
event
925-
parallel_for_impl(range<Dims> Range, id<Dims> WorkItemOffset,
926-
const std::vector<event> &DepEvents,
927-
_KERNELFUNCPARAM(KernelFunc) _CODELOCPARAM(&CodeLoc)) {
928-
_CODELOCARG(&CodeLoc);
923+
event parallel_for_impl(range<Dims> Range, id<Dims> WorkItemOffset,
924+
const std::vector<event> &DepEvents,
925+
_KERNELFUNCPARAM(KernelFunc)) {
926+
// Actual code location needs to be captured from KernelInfo object.
927+
const detail::code_location CodeLoc = {};
929928
return submit(
930929
[&](handler &CGH) {
931930
CGH.depends_on(DepEvents);
@@ -946,6 +945,7 @@ class __SYCL_EXPORT queue {
946945
std::enable_if_t<
947946
ext::oneapi::detail::AreAllButLastReductions<RestT...>::value, event>
948947
parallel_for(nd_range<Dims> Range, RestT &&...Rest) {
948+
// Actual code location needs to be captured from KernelInfo object.
949949
const detail::code_location CodeLoc = {};
950950
return submit(
951951
[&](handler &CGH) {
@@ -964,6 +964,7 @@ class __SYCL_EXPORT queue {
964964
template <typename KernelName = detail::auto_name, int Dims,
965965
typename... RestT>
966966
event parallel_for(nd_range<Dims> Range, event DepEvent, RestT &&...Rest) {
967+
// Actual code location needs to be captured from KernelInfo object.
967968
const detail::code_location CodeLoc = {};
968969
return submit(
969970
[&](handler &CGH) {
@@ -985,6 +986,7 @@ class __SYCL_EXPORT queue {
985986
typename... RestT>
986987
event parallel_for(nd_range<Dims> Range, const std::vector<event> &DepEvents,
987988
RestT &&...Rest) {
989+
// Actual code location needs to be captured from KernelInfo object.
988990
const detail::code_location CodeLoc = {};
989991
return submit(
990992
[&](handler &CGH) {
@@ -1083,6 +1085,7 @@ class __SYCL_EXPORT queue {
10831085
std::enable_if_t<
10841086
ext::oneapi::detail::AreAllButLastReductions<RestT...>::value, event>
10851087
parallel_for_impl(range<Dims> Range, RestT &&...Rest) {
1088+
// Actual code location needs to be captured from KernelInfo object.
10861089
const detail::code_location CodeLoc = {};
10871090
return submit(
10881091
[&](handler &CGH) {
@@ -1100,6 +1103,7 @@ class __SYCL_EXPORT queue {
11001103
/// \param CodeLoc contains the code location of user code
11011104
template <typename KernelName, int Dims, typename... RestT>
11021105
event parallel_for_impl(range<Dims> Range, event DepEvent, RestT &&...Rest) {
1106+
// Actual code location needs to be captured from KernelInfo object.
11031107
const detail::code_location CodeLoc = {};
11041108
return submit(
11051109
[&](handler &CGH) {
@@ -1120,6 +1124,7 @@ class __SYCL_EXPORT queue {
11201124
event parallel_for_impl(range<Dims> Range,
11211125
const std::vector<event> &DepEvents,
11221126
RestT &&...Rest) {
1127+
// Actual code location needs to be captured from KernelInfo object.
11231128
const detail::code_location CodeLoc = {};
11241129
return submit(
11251130
[&](handler &CGH) {

0 commit comments

Comments
 (0)