Skip to content

Commit 0b4e9e9

Browse files
Fznamznonvladimirlaz
authored andcommitted
[SYCL] Implement buffer::has_property and buffer::get_property
Signed-off-by: Mariya Podchishchaeva <[email protected]>
1 parent 0b9673f commit 0b4e9e9

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

sycl/include/CL/sycl/buffer.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,14 @@ class buffer {
192192
reinterpretRange);
193193
}
194194

195+
template <typename propertyT> bool has_property() const {
196+
return impl->template has_property<propertyT>();
197+
}
198+
199+
template <typename propertyT> propertyT get_property() const {
200+
return impl->template get_property<propertyT>();
201+
}
202+
195203
private:
196204
shared_ptr_class<detail::buffer_impl<AllocatorT>> impl;
197205
template <class Obj>

sycl/include/CL/sycl/detail/buffer_impl.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,14 @@ template <typename AllocatorT> class buffer_impl {
226226
accessOffset);
227227
}
228228

229+
template <typename propertyT> bool has_property() const {
230+
return Props.has_property<propertyT>();
231+
}
232+
233+
template <typename propertyT> propertyT get_property() const {
234+
return Props.get_property<propertyT>();
235+
}
236+
229237
public:
230238
void moveMemoryTo(QueueImplPtr Queue, std::vector<cl::sycl::event> DepEvents,
231239
EventImplPtr Event);

0 commit comments

Comments
 (0)