File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
sycl/include/CL/sycl/access Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,14 @@ struct PtrValueType<ElementType, access::address_space::global_space> {
127
127
128
128
template <typename ElementType>
129
129
struct PtrValueType <ElementType, access::address_space::constant_space> {
130
+ // Current implementation of address spaces handling leads to possibility
131
+ // of emitting incorrect (in terms of OpenCL) address space casts from constant
132
+ // to generic (and vise-versa). So, global address space is used here instead of
133
+ // constant to avoid incorrect address space casts in the produced device code.
134
+ // "const" qualifier is not used here because multi_ptr interface contains
135
+ // methods which return pure ElementType without qualifiers and adding const
136
+ // qualifier here will require adding const casts to multi_ptr methods to remove
137
+ // const qualifiers from underlying pointer type.
130
138
using type = SYCL_GLOBAL_AS ElementType;
131
139
};
132
140
You can’t perform that action at this time.
0 commit comments