mxnet
Public Member Functions | List of all members
mxnet::runtime::ObjAllocatorBase< Derived > Class Template Reference

Base class of object allocators that implements make. Use curiously recurring template pattern. More...

#include <memory.h>

Collaboration diagram for mxnet::runtime::ObjAllocatorBase< Derived >:
Collaboration graph

Public Member Functions

template<typename T , typename... Args>
ObjectPtr< T > make_object (Args &&...args)
 Make a new object using the allocator. More...
 
template<typename ArrayType , typename ElemType , typename... Args>
ObjectPtr< ArrayType > make_inplace_array (size_t num_elems, Args &&...args)
 

Detailed Description

template<typename Derived>
class mxnet::runtime::ObjAllocatorBase< Derived >

Base class of object allocators that implements make. Use curiously recurring template pattern.

Template Parameters
DerivedThe derived class.

Member Function Documentation

template<typename Derived>
template<typename ArrayType , typename ElemType , typename... Args>
ObjectPtr<ArrayType> mxnet::runtime::ObjAllocatorBase< Derived >::make_inplace_array ( size_t  num_elems,
Args &&...  args 
)
inline
Template Parameters
ArrayTypeThe type to be allocated.
ElemTypeThe type of array element.
ArgsThe constructor signature.
Parameters
num_elemsThe number of array elements.
argsThe arguments.
template<typename Derived>
template<typename T , typename... Args>
ObjectPtr<T> mxnet::runtime::ObjAllocatorBase< Derived >::make_object ( Args &&...  args)
inline

Make a new object using the allocator.

Template Parameters
TThe type to be allocated.
ArgsThe constructor signature.
Parameters
argsThe arguments.

The documentation for this class was generated from the following file: