diff --git a/include/ircd/cl/data.h b/include/ircd/cl/data.h index 63ad9e59e..614201fe5 100644 --- a/include/ircd/cl/data.h +++ b/include/ircd/cl/data.h @@ -22,6 +22,7 @@ struct ircd::cl::data public: explicit operator bool() const; + void *master() const; uint flags() const; size_t size() const; off_t offset() const; diff --git a/ircd/cl.cc b/ircd/cl.cc index 05643e3aa..5a1266352 100644 --- a/ircd/cl.cc +++ b/ircd/cl.cc @@ -2166,6 +2166,17 @@ const return info(clGetMemObjectInfo, cl_mem(mutable_cast(handle)), CL_MEM_FLAGS, buf); } +void * +ircd::cl::data::master() +const +{ + assert(handle); + + char buf[sizeof(void *)] {0}; + constexpr auto qtype(CL_MEM_ASSOCIATED_MEMOBJECT); + return info(clGetMemObjectInfo, cl_mem(mutable_cast(handle)), qtype, buf); +} + // // cl::work (event) //