class ObjAllocatorBase {
public:
/*!
+ * \brief Make a new object using the allocator.
* \tparam T The type to be allocated.
* \tparam Args The constructor signature.
* \param args The arguments.
*/
template<typename T, typename... Args>
- inline ObjectPtr<T> make(Args&&... args) {
+ inline ObjectPtr<T> make_object(Args&&... args) {
using Handler = typename Derived::template Handler<T>;
static_assert(std::is_base_of<Object, T>::value,
"make_node can only be used to create NodeBase");
template<typename T, typename... Args>
inline ObjectPtr<T> make_object(Args&&... args) {
- return SimpleObjAllocator().make<T>(std::forward<Args>(args)...);
+ return SimpleObjAllocator().make_object<T>(std::forward<Args>(args)...);
}
} // namespace runtime
inline Storage make_storage(size_t size, size_t alignment, TVMType dtype_hint, TVMContext ctx) {
// We could put cache in here, from ctx to storage allocator.
- auto storage_obj = SimpleObjAllocator().make<StorageObj>();
+ auto storage_obj = SimpleObjAllocator().make_object<StorageObj>();
auto alloc = MemoryManager::Global()->GetAllocator(ctx);
DCHECK(alloc != nullptr)
<< "allocator must not null";