mxnet
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Static Public Member Functions | List of all members
mxnet::common::ObjectPoolAllocatable< T > Struct Template Reference

Helper trait class for easy allocation and deallocation. More...

#include <object_pool.h>

Collaboration diagram for mxnet::common::ObjectPoolAllocatable< T >:
Collaboration graph

Static Public Member Functions

template<typename... Args>
static T * New (Args &&...args)
 Create new object. More...
 
static void Delete (T *ptr)
 Delete an existing object. More...
 

Detailed Description

template<typename T>
struct mxnet::common::ObjectPoolAllocatable< T >

Helper trait class for easy allocation and deallocation.

Member Function Documentation

template<typename T >
void mxnet::common::ObjectPoolAllocatable< T >::Delete ( T *  ptr)
static

Delete an existing object.

Parameters
ptrThe pointer to delete.

Make sure the pointer to delete is allocated from this pool.

template<typename T >
template<typename... Args>
T * mxnet::common::ObjectPoolAllocatable< T >::New ( Args &&...  args)
static

Create new object.

Returns
Pointer to the new object.

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