Skip to content

Commit

Permalink
[SYCL] Implement buffer::has_property and buffer::get_property
Browse files Browse the repository at this point in the history
Signed-off-by: Mariya Podchishchaeva <mariya.podchishchaeva@intel.com>
  • Loading branch information
Fznamznon authored and vladimirlaz committed Apr 1, 2019
1 parent 0b9673f commit 0b4e9e9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sycl/include/CL/sycl/buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,14 @@ class buffer {
reinterpretRange);
}

template <typename propertyT> bool has_property() const {
return impl->template has_property<propertyT>();
}

template <typename propertyT> propertyT get_property() const {
return impl->template get_property<propertyT>();
}

private:
shared_ptr_class<detail::buffer_impl<AllocatorT>> impl;
template <class Obj>
Expand Down
8 changes: 8 additions & 0 deletions sycl/include/CL/sycl/detail/buffer_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,14 @@ template <typename AllocatorT> class buffer_impl {
accessOffset);
}

template <typename propertyT> bool has_property() const {
return Props.has_property<propertyT>();
}

template <typename propertyT> propertyT get_property() const {
return Props.get_property<propertyT>();
}

public:
void moveMemoryTo(QueueImplPtr Queue, std::vector<cl::sycl::event> DepEvents,
EventImplPtr Event);
Expand Down

0 comments on commit 0b4e9e9

Please sign in to comment.