Skip to content
Snippets Groups Projects
Commit fc035bec authored by Yichao Yu's avatar Yichao Yu
Browse files

pyopencl_buf.to_arg

parent e814895d
No related branches found
No related tags found
No related merge requests found
......@@ -398,6 +398,18 @@ public:
this->reset((T*)realloc((void*)this->release(),
(len + 1) * sizeof(T)));
}
template<ArgType AT=ArgType::Length>
PYOPENCL_INLINE ArgBuffer<T, AT>
to_arg()
{
return ArgBuffer<T, AT>(this->get(), m_len);
}
template<ArgType AT=ArgType::Length>
PYOPENCL_INLINE ArgBuffer<const T, AT>
to_arg() const
{
return ArgBuffer<const T, AT>(this->get(), m_len);
}
};
template<typename Buff>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment