diff --git a/sycl/include/sycl/property_list.hpp b/sycl/include/sycl/property_list.hpp index 8f019eb7cf22b..9ac7dfb92a9df 100644 --- a/sycl/include/sycl/property_list.hpp +++ b/sycl/include/sycl/property_list.hpp @@ -25,6 +25,7 @@ template class accessor_property_list; } // namespace ext::oneapi namespace detail { class PropertyValidator; +class SYCLMemObjT; } // namespace detail /// Objects of the property_list class are containers for the SYCL properties @@ -58,15 +59,28 @@ class property_list : protected detail::PropertyListBase { return has_property_helper(); } + template operator ext::oneapi::accessor_property_list(); + +#ifdef __INTEL_PREVIEW_BREAKING_CHANGES +private: +#endif + +#ifndef __INTEL_PREVIEW_BREAKING_CHANGES + __SYCL_DEPRECATED("add_or_replace_accessor_properties() is not part of the " + "SYCL API and will be removed in the future.") +#endif void add_or_replace_accessor_properties(const property_list &PropertyList) { add_or_replace_accessor_properties_helper(PropertyList.MPropsWithData); } + +#ifndef __INTEL_PREVIEW_BREAKING_CHANGES + __SYCL_DEPRECATED("delete_accessor_property() is not part of the SYCL API " + "and will be removed in the future.") +#endif void delete_accessor_property(const sycl::detail::PropWithDataKind &Kind) { delete_accessor_property_helper(Kind); } - template operator ext::oneapi::accessor_property_list(); - private: property_list( std::bitset DataLessProps, @@ -76,6 +90,7 @@ class property_list : protected detail::PropertyListBase { template friend class ext::oneapi::accessor_property_list; friend class detail::PropertyValidator; + friend class detail::SYCLMemObjT; }; namespace detail { diff --git a/sycl/test/warnings/warnings_deprecated.cpp b/sycl/test/warnings/warnings_deprecated.cpp index 3dbf0d96ccfc3..4435f0c888531 100644 --- a/sycl/test/warnings/warnings_deprecated.cpp +++ b/sycl/test/warnings/warnings_deprecated.cpp @@ -11,5 +11,13 @@ int main() { // expected-warning@+2{{'discard_events' is deprecated: use sycl_ext_oneapi_enqueue_functions instead}} sycl::property_list props{ sycl::ext::oneapi::property::queue::discard_events{}}; + + // expected-warning@+1{{add_or_replace_accessor_properties() is not part of the SYCL API and will be removed in the future.}} + props.add_or_replace_accessor_properties(props); + + // expected-warning@+1{{delete_accessor_property() is not part of the SYCL API and will be removed in the future.}} + props.delete_accessor_property( + sycl::detail::PropWithDataKind::BufferUseMutex); + return 0; }