|
25 | 25 | Op " is not supported on host device.");
|
26 | 26 | #endif
|
27 | 27 |
|
| 28 | + |
28 | 29 | #ifdef __SYCL_DEVICE_ONLY__
|
29 | 30 | #define __OPENCL_GLOBAL_AS__ __attribute__((opencl_global))
|
30 | 31 | #ifdef __ENABLE_USM_ADDR_SPACE__
|
@@ -75,11 +76,11 @@ struct HasSubscriptOperator<
|
75 | 76 | template <typename T, typename... Args>
|
76 | 77 | annotated_arg(T, Args... args) -> annotated_arg<T, detail::properties_t<Args...>, std::is_pointer<T>::value>;
|
77 | 78 |
|
78 |
| -// template <typename T, typename... Args> |
79 |
| -// annotated_arg(T, properties<std::tuple<Args...>>) -> annotated_arg<T, detail::properties_t<Args...>, std::is_pointer<T>::value>; |
| 79 | +template <typename T, typename... Args> |
| 80 | +annotated_arg(T, properties<std::tuple<Args...>>) -> annotated_arg<T, detail::properties_t<Args...>, std::is_pointer<T>::value>; |
80 | 81 |
|
81 |
| -template <typename T, typename old, typename ArgT, bool IsPtr> |
82 |
| -annotated_arg(annotated_arg<T, old, IsPtr>, ArgT newp) -> annotated_arg<T, detail::merged_properties_t<old, ArgT>, IsPtr>; |
| 82 | +template <typename T, typename old, typename... ArgT, bool IsPtr> |
| 83 | +annotated_arg(annotated_arg<T, old, IsPtr>, properties<std::tuple<ArgT...>>) -> annotated_arg<T, detail::merged_properties_t<old, detail::properties_t<ArgT...>>, IsPtr>; |
83 | 84 |
|
84 | 85 | template <typename T, typename PropertyListT = detail::empty_properties_t, bool IsPtr = std::is_pointer<T>::value>
|
85 | 86 | class annotated_arg {
|
@@ -116,16 +117,18 @@ class __SYCL_SPECIAL_CLASS __SYCL_TYPE(annotated_arg) annotated_arg<T, detail::p
|
116 | 117 | // "Property list is invalid.");
|
117 | 118 | static_assert(check_property_list<T, Props...>::value,
|
118 | 119 | "The property list contains invalid property.");
|
| 120 | + static_assert(detail::SortedAllUnique<std::tuple<Props...>>::value, |
| 121 | + "Duplicate properties in property list."); |
119 | 122 |
|
120 | 123 | annotated_arg() noexcept = default;
|
121 | 124 | annotated_arg(const annotated_arg&) = default;
|
122 | 125 | annotated_arg& operator=(annotated_arg&) = default;
|
123 | 126 |
|
124 |
| - // explicit annotated_arg(const T& _ptr, const property_list_t &PropList = properties{}) noexcept |
125 |
| - // : obj((__OPENCL_GLOBAL_AS__ UnderlyingT*)_ptr) {} |
| 127 | + annotated_arg(const T& _ptr, const property_list_t &PropList = properties{}) noexcept |
| 128 | + : obj((__OPENCL_GLOBAL_AS__ UnderlyingT*)_ptr) {} |
126 | 129 |
|
127 | 130 | template<typename... PropertyValueTs>
|
128 |
| - explicit annotated_arg(const T& _ptr, PropertyValueTs... props) noexcept : obj((__OPENCL_GLOBAL_AS__ UnderlyingT*)_ptr) { |
| 131 | + annotated_arg(const T& _ptr, PropertyValueTs... props) noexcept : obj((__OPENCL_GLOBAL_AS__ UnderlyingT*)_ptr) { |
129 | 132 | static_assert(
|
130 | 133 | std::is_same<
|
131 | 134 | property_list_t,
|
@@ -223,10 +226,10 @@ class __SYCL_SPECIAL_CLASS __SYCL_TYPE(annotated_arg) annotated_arg <T, detail::
|
223 | 226 | annotated_arg(const annotated_arg&) = default;
|
224 | 227 | annotated_arg& operator=(annotated_arg&) = default;
|
225 | 228 |
|
226 |
| - explicit annotated_arg(const T& _obj, const property_list_t &PropList = properties{}) noexcept : obj(_obj) {} |
| 229 | + annotated_arg(const T& _obj, const property_list_t &PropList = properties{}) noexcept : obj(_obj) {} |
227 | 230 |
|
228 | 231 | template<typename... PropertyValueTs>
|
229 |
| - explicit annotated_arg(const T& _obj, PropertyValueTs... props) noexcept : obj(_obj) { |
| 232 | + annotated_arg(const T& _obj, PropertyValueTs... props) noexcept : obj(_obj) { |
230 | 233 | static_assert(
|
231 | 234 | std::is_same<
|
232 | 235 | property_list_t,
|
|
0 commit comments