mxnet
|
A managed object in MXNet runtime. More...
#include <dmlc/logging.h>
#include <type_traits>
#include <string>
#include <utility>
#include "c_runtime_api.h"
#include <atomic>
Go to the source code of this file.
Classes | |
class | mxnet::runtime::Object |
base class of all object containers. More... | |
class | mxnet::runtime::ObjectPtr< T > |
A custom smart pointer for Object. More... | |
class | mxnet::runtime::ObjectRef |
Base class of all object reference. More... | |
struct | mxnet::runtime::ObjectHash |
ObjectRef hash functor. More... | |
struct | mxnet::runtime::ObjectEqual |
ObjectRef equal functor. More... | |
Namespaces | |
mxnet | |
namespace of mxnet | |
mxnet::runtime | |
Macros | |
#define | MXNET_OBJECT_ATOMIC_REF_COUNTER 1 |
Whether or not use atomic reference counter. If the reference counter is not atomic, an object cannot be owned by multiple threads. We can, however, move an object across threads. More... | |
#define | MXNET_DECLARE_BASE_OBJECT_INFO(TypeName, ParentType) |
helper macro to declare a base object type that can be inheritated. More... | |
#define | MXNET_DECLARE_FINAL_OBJECT_INFO(TypeName, ParentType) |
helper macro to declare type information in a final class. More... | |
#define | MXNET_REGISTER_OBJECT_TYPE(TypeName) |
Helper macro to register the object type to runtime. Makes sure that the runtime type table is correctly populated. More... | |
#define | MXNET_DEFINE_OBJECT_REF_METHODS(TypeName, ParentType, ObjectName) |
#define | MXNET_DEFINE_OBJECT_REF_METHODS_MUT(TypeName, ParentType, ObjectName) |
Typedefs | |
template<typename T > | |
using | mxnet::NodePtr = runtime::ObjectPtr< T > |
Enumerations | |
enum | mxnet::runtime::TypeIndex { mxnet::runtime::kRoot = 0, mxnet::runtime::kMXNetTensor = 1, mxnet::runtime::kMXNetClosure = 2, mxnet::runtime::kMXNetADT = 3, mxnet::runtime::kRuntimeModule = 4, mxnet::runtime::kEllipsis = 5, mxnet::runtime::kSlice = 6, mxnet::runtime::kInteger = 7, mxnet::runtime::kStaticIndexEnd, mxnet::runtime::kDynamic = kStaticIndexEnd } |
list of the type index. More... | |
Functions | |
template<typename RefType , typename ObjectType > | |
RefType | mxnet::runtime::GetRef (const ObjectType *ptr) |
Get a reference type from a raw object ptr type. More... | |
template<typename SubRef , typename BaseRef > | |
SubRef | mxnet::runtime::Downcast (BaseRef ref) |
Downcast a base reference type to a more specific type. More... | |
template<typename BaseType , typename ObjectType > | |
ObjectPtr< BaseType > | mxnet::runtime::GetObjectPtr (ObjectType *ptr) |
Get an object ptr type from a raw object ptr. More... | |
template<typename RefType , typename ObjType > | |
RefType | mxnet::runtime::GetRef (const ObjType *ptr) |
template<typename BaseType , typename ObjType > | |
ObjectPtr< BaseType > | mxnet::runtime::GetObjectPtr (ObjType *ptr) |
A managed object in MXNet runtime.
#define MXNET_DECLARE_BASE_OBJECT_INFO | ( | TypeName, | |
ParentType | |||
) |
helper macro to declare a base object type that can be inheritated.
TypeName | The name of the current type. |
ParentType | The name of the ParentType |
#define MXNET_DECLARE_FINAL_OBJECT_INFO | ( | TypeName, | |
ParentType | |||
) |
helper macro to declare type information in a final class.
TypeName | The name of the current type. |
ParentType | The name of the ParentType |
#define MXNET_DEFINE_OBJECT_REF_METHODS | ( | TypeName, | |
ParentType, | |||
ObjectName | |||
) |
#define MXNET_DEFINE_OBJECT_REF_METHODS_MUT | ( | TypeName, | |
ParentType, | |||
ObjectName | |||
) |
#define MXNET_OBJECT_ATOMIC_REF_COUNTER 1 |
Whether or not use atomic reference counter. If the reference counter is not atomic, an object cannot be owned by multiple threads. We can, however, move an object across threads.
#define MXNET_REGISTER_OBJECT_TYPE | ( | TypeName | ) |
Helper macro to register the object type to runtime. Makes sure that the runtime type table is correctly populated.
Use this macro in the cc file for each terminal class.