Skip to content

Commit 68c275c

Browse files
authored
[SYCL] Align handler::require API with the SYCL specification (#2325)
This fix corrects the definition of the handler::require API in our headers to match the SYCL specification. The SYCL spec defines the accessor parameter of "require" to be passed by value. Our headers defined the API to take an accessor by reference. This PR changes the accessor parameter from reference to value. Signed-off-by: rdeodhar <[email protected]>
1 parent f8902b8 commit 68c275c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sycl/include/CL/sycl/handler.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,8 +757,9 @@ class __SYCL_EXPORT handler {
757757
/// \param Acc is a SYCL accessor describing required memory region.
758758
template <typename DataT, int Dims, access::mode AccMode,
759759
access::target AccTarget>
760-
void require(accessor<DataT, Dims, AccMode, AccTarget,
761-
access::placeholder::true_t> &Acc) {
760+
void
761+
require(accessor<DataT, Dims, AccMode, AccTarget, access::placeholder::true_t>
762+
Acc) {
762763
#ifndef __SYCL_DEVICE_ONLY__
763764
associateWithHandler(&Acc, AccTarget);
764765
#else

0 commit comments

Comments
 (0)