tqchen commented on a change in pull request #4346: [Runtime] Make ADTObject
POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#discussion_r347543087
##########
File path: include/tvm/runtime/memory.h
##########
@@ -73,6 +74,26 @@ class ObjAllocatorBase {
ptr->deleter_ = Handler::Deleter();
return ObjectPtr<T>(ptr);
}
+
+ /*!
+ * \tparam T The type to be allocated.
+ * \tparam ElemType The type to array element.
+ * \tparam Args The constructor signature.
+ * \param num_elems The number of array elements.
+ * \param args The arguments.
+ */
+ template<typename T, typename ElemType, typename... Args>
+ inline ObjectPtr<T> make_array(size_t num_elems, Args&&... args) {
Review comment:
make_inplace_array_object
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services