Skip to content

[SYCL] Update get_pointer to return T* for target::device specialized accessor. #8874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 77 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
2ada46b
Update get_pointer to return T* for target::device
mmoadeli Mar 30, 2023
4804f6a
Minor style enf of file fix.
mmoadeli Mar 30, 2023
fc52e63
Merge branch 'sycl' into get_pointer_device
mmoadeli Mar 30, 2023
78fa371
Reflect update to get_pointer in target::device specialized accessor …
mmoadeli Mar 30, 2023
f426ba4
Fix merge issue introduced in prev commit.
mmoadeli Mar 30, 2023
3e54004
Reflect update to get_pointer return type to relevant test.
mmoadeli Mar 30, 2023
d0e8841
Reflect update to get_pointer return type to relevant tests.
mmoadeli Mar 30, 2023
b673153
Fix failing test due to updates to get_pointer return type.
mmoadeli Mar 31, 2023
dfe10ac
Merge branch 'sycl' into get_pointer_device
mmoadeli Mar 31, 2023
f3943b0
Merge branch 'get_pointer_device' of https://github.com/mmoadeli/llvm…
mmoadeli Mar 31, 2023
2d593b4
Merge branch 'sycl' into get_pointer_device
mmoadeli Mar 31, 2023
32f345d
Fix failing tests related to get_pointer return updates.
mmoadeli Mar 31, 2023
045e708
Fix failing cuda tests, due to updates to get_pointer return type.
mmoadeli Apr 1, 2023
7d1bf5a
The return type of get_pointer in mode::read is const T*. This comes …
mmoadeli Apr 2, 2023
073693d
Merge branch 'get_pointer_device' of https://github.com/mmoadeli/llvm…
mmoadeli Apr 2, 2023
dae97ea
Merge branch 'sycl' into get_pointer_device
mmoadeli Apr 2, 2023
c586d86
Replace use of global_ptr<T>(Acc) with call to Acc.get_multi_ptr in t…
mmoadeli Apr 6, 2023
00b74e8
Replace use of global_ptr<T>(acc) with acc.get_multi_ptr.
mmoadeli Apr 6, 2023
12ead6d
Use global_ptr in cuda/matrix tests.
mmoadeli Apr 6, 2023
a2e31f5
- Relax const-ness on is_native_op and is_arithmetic_or_complex compi…
mmoadeli Apr 8, 2023
007c43a
Merge branch 'sycl' into get_pointer_device
mmoadeli Apr 8, 2023
cc8c9f1
Reflect changes to get_pointer into related tests.
mmoadeli Apr 8, 2023
c0e5c9b
Further work on having `src` of async_work_group_copy to be const al…
mmoadeli Apr 10, 2023
ea42a1e
Update sycl/include/sycl/ext/intel/esimd/detail/util.hpp
mmoadeli Apr 10, 2023
9262a40
Apply clang-format style fix.
mmoadeli Apr 10, 2023
70de91b
Undo commenting code.
mmoadeli Apr 10, 2023
7d110a9
Replace use of global_ptr with get_multi_ptr<>.
mmoadeli Apr 10, 2023
54b0d19
Replace use of global_ptr with get_multi_ptr<>
mmoadeli Apr 10, 2023
df309bf
Apply clang-format style fix.
mmoadeli Apr 10, 2023
69c3adc
Apply clang-format style fix.
mmoadeli Apr 10, 2023
01c9360
Apply clang-format style fix.
mmoadeli Apr 10, 2023
b7360e8
Replace global_ptr with get_multi_ptr.
mmoadeli Apr 10, 2023
9d5fd0b
Merge branch 'sycl' into get_pointer_device
mmoadeli Apr 10, 2023
2a1de20
Merge branch 'intel:sycl' into get_pointer_device
mmoadeli Apr 13, 2023
05524a7
Fix `ConvertToOpenCLType_t` failure to handle `const sycl::byte` and …
mmoadeli Apr 13, 2023
eae8bcb
- Reverts updates to __SYCL_OpGroupAsyncCopyGlobalToLocal
mmoadeli Apr 14, 2023
2bda450
Merge branch 'intel:sycl' into get_pointer_device
mmoadeli Apr 14, 2023
ab6c96b
Merge branch 'get_pointer_device' of https://github.com/mmoadeli/llvm…
mmoadeli Apr 14, 2023
c1e4fb2
- Update cuda matrix samples.
mmoadeli Apr 16, 2023
b4a6a52
Merge branch 'intel:sycl' into get_pointer_device
mmoadeli Apr 16, 2023
dfc898c
Converts access::decorated type to `legacy` in failing tests.
mmoadeli Apr 16, 2023
fea5894
Add typename to template argument.
mmoadeli Apr 17, 2023
dde1ff6
- Fix `const` to `non-const` cast error in esimd.
mmoadeli Apr 17, 2023
1a619c9
Replace decorate::legacy with decorate::no.
mmoadeli Apr 17, 2023
49870d0
- Replace `get_pointer` with `get_multi_ptr` to avoid un-necessary c…
mmoadeli Apr 18, 2023
1202702
Address review comments.
mmoadeli Apr 27, 2023
987d411
Merge branch 'sycl' into get_pointer_device
mmoadeli Apr 27, 2023
6834d67
Apply review comments
mmoadeli Apr 27, 2023
5766203
Fix a merge conflict issue.
mmoadeli Apr 27, 2023
b82165a
Minor merge fix.
mmoadeli Apr 27, 2023
7fe9933
Code style fix.
mmoadeli Apr 27, 2023
b4e742b
Replace accessor::get_pointer with accessor::get_multi_ptr
mmoadeli Apr 28, 2023
f4ffce5
Merge branch 'intel:sycl' into get_pointer_device
mmoadeli Apr 28, 2023
71cbce5
Merge branch 'sycl' into get_pointer_device
mmoadeli May 1, 2023
f3cb111
Use `get_multi_ptr` without .get().
mmoadeli May 3, 2023
ad15860
Merge branch 'sycl' into get_pointer_device
mmoadeli May 3, 2023
af22d32
Merge branch 'sycl' into get_pointer_device
mmoadeli May 3, 2023
f9087a4
Fix code style.
mmoadeli May 3, 2023
759160c
Merge branch 'get_pointer_device' of https://github.com/mmoadeli/llvm…
mmoadeli May 3, 2023
1300d84
Fix merge conflict bug.
mmoadeli May 3, 2023
9b4a803
Merge branch 'get_pointer_device' of https://github.com/mmoadeli/llvm…
mmoadeli May 4, 2023
86d0626
Clang code style fix.
mmoadeli May 4, 2023
b31cb27
Update sycl/include/sycl/multi_ptr.hpp
mmoadeli May 10, 2023
76df754
Fix implicit conversion from multi_ptr<T> to multi_ptr<const T>.
mmoadeli May 10, 2023
1f8dadc
Merge branch 'sycl' into get_pointer_device
mmoadeli May 13, 2023
da802b5
Fix duplicate alias definition
mmoadeli May 13, 2023
959298d
Fix build re-definition error.
mmoadeli May 13, 2023
6639af8
Remove un-necessary void.
mmoadeli May 13, 2023
ec007e9
Merge branch 'sycl' into get_pointer_device
mmoadeli May 16, 2023
a5d49b4
Fix implicit conversion from multi_ptr<T> to multi_ptr<const T>
mmoadeli May 16, 2023
88c6d67
Fix multi_ptr c'tor.
mmoadeli May 16, 2023
e9c9493
Merge branch 'sycl' into get_pointer_device
mmoadeli May 16, 2023
ebc3220
sync amdgpu-openmp-toolchain.c with the one in sycl branch.
mmoadeli May 16, 2023
ee80741
Replacd numerical values in cuda/matrix tests with wildcards.
mmoadeli May 16, 2023
d0cba0f
Replace access::decorated::no with access::decorated::yes in cuda/mat…
mmoadeli May 17, 2023
31ff679
Remove un-necessary cast in multi_ptr ctor.
mmoadeli May 18, 2023
ae18a4b
Merge branch 'sycl' into get_pointer_device
mmoadeli May 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions sycl/include/sycl/accessor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2124,23 +2124,12 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
template <access::target AccessTarget_ = AccessTarget,
typename = std::enable_if_t<
(AccessTarget_ == access::target::host_buffer) ||
(AccessTarget_ == access::target::host_task)>>
#if SYCL_LANGUAGE_VERSION >= 202001
std::add_pointer_t<value_type> get_pointer() const noexcept
#else
DataT *get_pointer() const
#endif
{
(AccessTarget_ == access::target::host_task) ||
(AccessTarget_ == access::target::device)>>
std::add_pointer_t<value_type> get_pointer() const noexcept {
return getPointerAdjusted();
}

template <
access::target AccessTarget_ = AccessTarget,
typename = std::enable_if_t<AccessTarget_ == access::target::device>>
global_ptr<DataT> get_pointer() const {
return global_ptr<DataT>(getPointerAdjusted());
}

template <access::target AccessTarget_ = AccessTarget,
typename = std::enable_if_t<AccessTarget_ ==
access::target::constant_buffer>>
Expand Down
12 changes: 9 additions & 3 deletions sycl/include/sycl/ext/intel/esimd/detail/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,15 @@ template <unsigned N> class ForHelper {
/// Returns the address referenced by the accessor \p Acc and
/// the byte offset \p Offset.
template <typename T, typename AccessorTy, typename OffsetTy = uint32_t>
T *accessorToPointer(AccessorTy Acc, OffsetTy Offset = 0) {
auto BytePtr = reinterpret_cast<char *>(Acc.get_pointer().get()) + Offset;
return reinterpret_cast<T *>(BytePtr);
auto accessorToPointer(AccessorTy Acc, OffsetTy Offset = 0) {
using QualCharPtrType =
std::conditional_t<std::is_const_v<typename AccessorTy::value_type>,
const char *, char *>;
using QualTPtrType =
std::conditional_t<std::is_const_v<typename AccessorTy::value_type>,
const T *, T *>;
auto BytePtr = reinterpret_cast<QualCharPtrType>(Acc.get_pointer()) + Offset;
return reinterpret_cast<QualTPtrType>(BytePtr);
}
#endif // __ESIMD_FORCE_STATELESS_MEM

Expand Down
7 changes: 3 additions & 4 deletions sycl/include/sycl/ext/intel/experimental/esimd/memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,7 @@ __ESIMD_API std::enable_if_t<!std::is_pointer_v<AccessorTy>,
lsc_gather(AccessorTy acc, __ESIMD_NS::simd<uint32_t, N> offsets,
__ESIMD_NS::simd_mask<N> pred = 1) {
#ifdef __ESIMD_FORCE_STATELESS_MEM
return lsc_gather<T, NElts, DS, L1H, L3H>(acc.get_pointer().get(), offsets,
pred);
return lsc_gather<T, NElts, DS, L1H, L3H>(acc.get_pointer(), offsets, pred);
#else
detail::check_lsc_vector_size<NElts>();
detail::check_lsc_data_size<T, DS>();
Expand Down Expand Up @@ -829,8 +828,8 @@ lsc_gather(AccessorTy acc, __ESIMD_NS::simd<uint32_t, N> offsets,
__ESIMD_NS::simd_mask<N> pred,
__ESIMD_NS::simd<T, N * NElts> old_values) {
#ifdef __ESIMD_FORCE_STATELESS_MEM
return lsc_gather<T, NElts, DS, L1H, L3H>(acc.get_pointer().get(), offsets,
pred, old_values);
return lsc_gather<T, NElts, DS, L1H, L3H>(acc.get_pointer(), offsets, pred,
old_values);
#else
detail::check_lsc_vector_size<NElts>();
detail::check_lsc_data_size<T, DS>();
Expand Down
11 changes: 7 additions & 4 deletions sycl/include/sycl/group_algorithm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ using native_op_list =

template <typename T, typename BinaryOperation> struct is_native_op {
static constexpr bool value =
is_contained<BinaryOperation, native_op_list<T>>::value ||
is_contained<BinaryOperation,
native_op_list<std::remove_const_t<T>>>::value ||
is_contained<BinaryOperation,
native_op_list<std::add_const_t<T>>>::value ||
is_contained<BinaryOperation, native_op_list<void>>::value;
};

Expand All @@ -123,9 +126,9 @@ struct is_complex

// ---- is_arithmetic_or_complex
template <typename T>
using is_arithmetic_or_complex =
std::integral_constant<bool, sycl::detail::is_complex<T>::value ||
sycl::detail::is_arithmetic<T>::value>;
using is_arithmetic_or_complex = std::integral_constant<
bool, sycl::detail::is_complex<typename std::remove_cv_t<T>>::value ||
sycl::detail::is_arithmetic<T>::value>;

template <typename T>
struct is_vector_arithmetic_or_complex
Expand Down
33 changes: 20 additions & 13 deletions sycl/include/sycl/multi_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,16 @@ class multi_ptr {
: m_Pointer(ptr) {}
multi_ptr(std::nullptr_t) : m_Pointer(nullptr) {}

// Implicit conversion from multi_ptr<T> to multi_ptr<const T>
template <typename NonConstElementType = std::remove_const_t<ElementType>,
typename = typename std::enable_if_t<
std::is_const_v<ElementType> &&
std::is_same_v<NonConstElementType,
std::remove_const_t<ElementType>>>>
explicit multi_ptr(
multi_ptr<NonConstElementType, Space, DecorateAddress> MPtr)
: m_Pointer(MPtr.get_decorated()) {}

// Only if Space is in
// {global_space, ext_intel_global_device_space, generic_space}
template <
Expand All @@ -126,8 +136,7 @@ class multi_ptr {
multi_ptr(accessor<ElementType, Dimensions, Mode, access::target::device,
isPlaceholder, PropertyListT>
Accessor)
: multi_ptr(
detail::cast_AS<decorated_type *>(Accessor.get_pointer().get())) {}
: multi_ptr(Accessor.template get_multi_ptr<DecorateAddress>()) {}

// Only if Space == local_space || generic_space
template <int Dimensions, access::mode Mode,
Expand All @@ -149,7 +158,7 @@ class multi_ptr {
(Space == access::address_space::generic_space ||
Space == access::address_space::local_space)>>
multi_ptr(local_accessor<ElementType, Dimensions> Accessor)
: m_Pointer(detail::cast_AS<decorated_type *>(Accessor.get_pointer())) {}
: multi_ptr(Accessor.template get_multi_ptr<DecorateAddress>()) {}

// The following constructors are necessary to create multi_ptr<const
// ElementType, Space, DecorateAddress> from accessor<ElementType, ...>.
Expand Down Expand Up @@ -177,8 +186,8 @@ class multi_ptr {
multi_ptr(accessor<typename std::remove_const_t<RelayElementType>, Dimensions,
Mode, access::target::device, isPlaceholder, PropertyListT>
Accessor)
: multi_ptr(
detail::cast_AS<decorated_type *>(Accessor.get_pointer().get())) {}
: m_Pointer(Accessor.template get_multi_ptr<DecorateAddress>()
.get_decorated()) {}

// Only if Space == local_space || generic_space and element type is const
template <int Dimensions, access::mode Mode,
Expand Down Expand Up @@ -208,7 +217,7 @@ class multi_ptr {
multi_ptr(
local_accessor<typename std::remove_const_t<RelayElementType>, Dimensions>
Accessor)
: m_Pointer(detail::cast_AS<decorated_type *>(Accessor.get_pointer())) {}
: multi_ptr(Accessor.template get_multi_ptr<DecorateAddress>()) {}

// Assignment and access operators
multi_ptr &operator=(const multi_ptr &) = default;
Expand Down Expand Up @@ -441,8 +450,7 @@ class multi_ptr<const void, Space, DecorateAddress> {
multi_ptr(accessor<ElementType, Dimensions, Mode, access::target::device,
isPlaceholder, PropertyListT>
Accessor)
: multi_ptr(
detail::cast_AS<decorated_type *>(Accessor.get_pointer().get())) {}
: multi_ptr(Accessor.template get_multi_ptr<DecorateAddress>()) {}

// Only if Space == local_space
template <
Expand All @@ -463,7 +471,7 @@ class multi_ptr<const void, Space, DecorateAddress> {
typename = typename std::enable_if_t<
RelaySpace == Space && Space == access::address_space::local_space>>
multi_ptr(local_accessor<ElementType, Dimensions> Accessor)
: m_Pointer(detail::cast_AS<decorated_type *>(Accessor.get_pointer())) {}
: multi_ptr(Accessor.template get_multi_ptr<DecorateAddress>()) {}

// Assignment operators
multi_ptr &operator=(const multi_ptr &) = default;
Expand Down Expand Up @@ -567,8 +575,7 @@ class multi_ptr<void, Space, DecorateAddress> {
multi_ptr(accessor<ElementType, Dimensions, Mode, access::target::device,
isPlaceholder, PropertyListT>
Accessor)
: multi_ptr(
detail::cast_AS<decorated_type *>(Accessor.get_pointer().get())) {}
: multi_ptr(Accessor.template get_multi_ptr<DecorateAddress>()) {}

// Only if Space == local_space
template <
Expand All @@ -589,7 +596,7 @@ class multi_ptr<void, Space, DecorateAddress> {
typename = typename std::enable_if_t<
RelaySpace == Space && Space == access::address_space::local_space>>
multi_ptr(local_accessor<ElementType, Dimensions> Accessor)
: m_Pointer(detail::cast_AS<decorated_type *>(Accessor.get_pointer())) {}
: multi_ptr(Accessor.template get_multi_ptr<DecorateAddress>()) {}

// Assignment operators
multi_ptr &operator=(const multi_ptr &) = default;
Expand Down Expand Up @@ -760,7 +767,7 @@ class multi_ptr<ElementType, Space, access::decorated::legacy> {
multi_ptr(accessor<ElementType, dimensions, Mode, access::target::device,
isPlaceholder, PropertyListT>
Accessor) {
m_Pointer = detail::cast_AS<pointer_t>(Accessor.get_pointer().get());
m_Pointer = detail::cast_AS<pointer_t>(Accessor.get_pointer());
}

// Only if Space == local_space || generic_space
Expand Down
23 changes: 12 additions & 11 deletions sycl/test-e2e/Basic/multi_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ template <typename T> struct point {
};

template <typename T, access::decorated IsDecorated>
void innerFunc(id<1> wiID, global_ptr<T, IsDecorated> ptr_1,
void innerFunc(id<1> wiID, global_ptr<const T, IsDecorated> ptr_1,
global_ptr<T, IsDecorated> ptr_2,
global_ptr<T, IsDecorated> ptr_3,
global_ptr<T, IsDecorated> ptr_4,
Expand Down Expand Up @@ -110,9 +110,8 @@ template <typename T, access::decorated IsDecorated> void testMultPtr() {
private_data[i] = 0;
localAccessor[wiID.get_local_id()] = 0;

auto ptr_1 =
multi_ptr<T, access::address_space::global_space, IsDecorated>(
accessorData_1);
auto ptr_1 = multi_ptr<const T, access::address_space::global_space,
IsDecorated>(accessorData_1);
auto ptr_2 =
multi_ptr<T, access::address_space::global_space, IsDecorated>(
accessorData_2);
Expand All @@ -136,19 +135,21 @@ template <typename T, access::decorated IsDecorated> void testMultPtr() {

// Construct extension pointer from accessors.
auto dev_ptr =
multi_ptr<T, access::address_space::ext_intel_global_device_space,
multi_ptr<const T,
access::address_space::ext_intel_global_device_space,
IsDecorated>(accessorData_1);
static_assert(std::is_same_v<ext::intel::device_ptr<T, IsDecorated>,
decltype(dev_ptr)>,
"Incorrect type for dev_ptr.");
static_assert(
std::is_same_v<ext::intel::device_ptr<const T, IsDecorated>,
decltype(dev_ptr)>,
"Incorrect type for dev_ptr.");

// General conversions in multi_ptr class
T *RawPtr = nullptr;
global_ptr<T, IsDecorated> ptr_6 =
address_space_cast<access::address_space::global_space,
IsDecorated>(RawPtr);

global_ptr<T, IsDecorated> ptr_7(accessorData_1);
global_ptr<const T, IsDecorated> ptr_7(accessorData_1);

global_ptr<void, IsDecorated> ptr_8 =
address_space_cast<access::address_space::global_space,
Expand Down Expand Up @@ -206,12 +207,12 @@ void testMultPtrArrowOperator() {
point<T> private_val = 0;

auto ptr_1 =
multi_ptr<point<T>, access::address_space::global_space,
multi_ptr<const point<T>, access::address_space::global_space,
IsDecorated>(accessorData_1);
auto ptr_2 = multi_ptr<point<T>, access::address_space::local_space,
IsDecorated>(accessorData_2);
auto ptr_3 =
multi_ptr<point<T>,
multi_ptr<const point<T>,
access::address_space::ext_intel_global_device_space,
IsDecorated>(accessorData_3);
auto ptr_4 =
Expand Down
32 changes: 18 additions & 14 deletions sycl/test-e2e/Basic/multi_ptr_legacy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <cassert>
#include <iostream>
#include <sycl/sycl.hpp>
#include <sycl.hpp>
#include <type_traits>

using namespace sycl;
Expand All @@ -30,7 +30,7 @@ template <typename T> struct point {
};

template <typename T>
void innerFunc(id<1> wiID, global_ptr<T> ptr_1, global_ptr<T> ptr_2,
void innerFunc(id<1> wiID, global_ptr<const T> ptr_1, global_ptr<T> ptr_2,
local_ptr<T> local_ptr) {
T t = ptr_1[wiID.get(0)];
local_ptr[wiID.get(0)] = t;
Expand Down Expand Up @@ -64,31 +64,33 @@ template <typename T> void testMultPtr() {

cgh.parallel_for<class testMultPtrKernel<T>>(
nd_range<1>{10, 10}, [=](nd_item<1> wiID) {
auto ptr_1 = make_ptr<T, access::address_space::global_space,
auto ptr_1 = make_ptr<const T, access::address_space::global_space,
access::decorated::legacy>(
accessorData_1.get_pointer());
accessorData_1
.template get_multi_ptr<sycl::access::decorated::legacy>());
auto ptr_2 = make_ptr<T, access::address_space::global_space,
access::decorated::legacy>(
accessorData_2.get_pointer());
accessorData_2
.template get_multi_ptr<sycl::access::decorated::legacy>());
auto local_ptr = make_ptr<T, access::address_space::local_space,
access::decorated::legacy>(
localAccessor.get_pointer());

// Construct extension pointer from accessors.
auto dev_ptr =
multi_ptr<T,
multi_ptr<const T,
access::address_space::ext_intel_global_device_space>(
accessorData_1);
static_assert(
std::is_same_v<ext::intel::device_ptr<T>, decltype(dev_ptr)>,
"Incorrect type for dev_ptr.");
static_assert(std::is_same_v<ext::intel::device_ptr<const T>,
decltype(dev_ptr)>,
"Incorrect type for dev_ptr.");

// General conversions in multi_ptr class
T *RawPtr = nullptr;
global_ptr<T> ptr_4(RawPtr);
ptr_4 = RawPtr;

global_ptr<T> ptr_5(accessorData_1);
global_ptr<const T> ptr_5(accessorData_1);

global_ptr<void> ptr_6((void *)RawPtr);

Expand Down Expand Up @@ -144,9 +146,11 @@ template <typename T> void testMultPtrArrowOperator() {

cgh.parallel_for<class testMultPtrArrowOperatorKernel<T>>(
sycl::nd_range<1>{1, 1}, [=](sycl::nd_item<1>) {
auto ptr_1 = make_ptr<point<T>, access::address_space::global_space,
access::decorated::legacy>(
accessorData_1.get_pointer());
auto ptr_1 =
make_ptr<const point<T>, access::address_space::global_space,
access::decorated::legacy>(
accessorData_1.template get_multi_ptr<
sycl::access::decorated::legacy>());
auto ptr_2 =
make_ptr<point<T>, access::address_space::constant_space,
access::decorated::legacy>(
Expand All @@ -155,7 +159,7 @@ template <typename T> void testMultPtrArrowOperator() {
access::decorated::legacy>(
accessorData_3.get_pointer());
auto ptr_4 =
make_ptr<point<T>,
make_ptr<const point<T>,
access::address_space::ext_intel_global_device_space,
access::decorated::legacy>(
accessorData_4.get_pointer());
Expand Down
4 changes: 3 additions & 1 deletion sycl/test-e2e/GroupAlgorithm/SYCL2020/all_of.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ void test(queue q, InputContainer input, OutputContainer output,
int lid = it.get_local_id(0);
out[0] = all_of_group(g, pred(in[lid]));
out[1] = all_of_group(g, in[lid], pred);
out[2] = joint_all_of(g, in.get_pointer(), in.get_pointer() + N, pred);
out[2] = joint_all_of(
g, in.template get_multi_ptr<access::decorated::no>(),
in.template get_multi_ptr<access::decorated::no>() + N, pred);
});
});
}
Expand Down
4 changes: 3 additions & 1 deletion sycl/test-e2e/GroupAlgorithm/SYCL2020/any_of.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ void test(queue q, InputContainer input, OutputContainer output,
int lid = it.get_local_id(0);
out[0] = any_of_group(g, pred(in[lid]));
out[1] = any_of_group(g, in[lid], pred);
out[2] = joint_any_of(g, in.get_pointer(), in.get_pointer() + N, pred);
out[2] = joint_any_of(
g, in.template get_multi_ptr<access::decorated::no>(),
in.template get_multi_ptr<access::decorated::no>() + N, pred);
});
});
}
Expand Down
13 changes: 9 additions & 4 deletions sycl/test-e2e/GroupAlgorithm/SYCL2020/exclusive_scan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ void test(queue q, InputContainer input, OutputContainer output,
accessor out{out_buf, cgh, sycl::write_only, sycl::no_init};
cgh.parallel_for<kernel_name2>(nd_range<1>(G, G), [=](nd_item<1> it) {
group<1> g = it.get_group();
joint_exclusive_scan(g, in.get_pointer(), in.get_pointer() + N,
out.get_pointer(), binary_op);
joint_exclusive_scan(
g, in.template get_multi_ptr<access::decorated::no>(),
in.template get_multi_ptr<access::decorated::no>() + N,
out.template get_multi_ptr<access::decorated::no>(), binary_op);
});
});
}
Expand All @@ -109,8 +111,11 @@ void test(queue q, InputContainer input, OutputContainer output,
accessor out{out_buf, cgh, sycl::write_only, sycl::no_init};
cgh.parallel_for<kernel_name3>(nd_range<1>(G, G), [=](nd_item<1> it) {
group<1> g = it.get_group();
joint_exclusive_scan(g, in.get_pointer(), in.get_pointer() + N,
out.get_pointer(), init, binary_op);
joint_exclusive_scan(
g, in.template get_multi_ptr<access::decorated::no>(),
in.template get_multi_ptr<access::decorated::no>() + N,
out.template get_multi_ptr<access::decorated::no>(), init,
binary_op);
});
});
}
Expand Down
Loading