Go to the documentation of this file.
25 #ifndef MXNET_RUNTIME_FFI_HELPER_H_
26 #define MXNET_RUNTIME_FFI_HELPER_H_
40 static constexpr
const char*
_type_key =
"MXNet.Ellipsis";
45 return ObjectRef(make_object<EllipsisObj>());
56 static constexpr
const char*
_type_key =
"MXNet.Slice";
62 explicit inline Slice(int64_t start,
69 data_ = std::move(data);
75 static constexpr int64_t
kNoneValue = std::numeric_limits<int64_t>::min();
88 static constexpr
const char*
_type_key =
"MXNet.Integer";
96 data_ = std::move(data);
113 data_ = std::move(data);
132 template <
typename... Args>
134 data_->EmplaceInit(idx, std::forward<Args>(args)...);
138 return ADT(std::move(data_));
147 #endif // MXNET_RUNTIME_FFI_HELPER_H_
namespace of mxnet
Definition: api_registry.h:33
int64_t stop
Definition: ffi_helper.h:52
static constexpr const uint32_t _type_index
Definition: ffi_helper.h:39
base class of all object containers.
Definition: object.h:151
Common POD(plain old data) container types.
Definition: ffi_helper.h:109
static constexpr const uint32_t _type_index
Definition: ffi_helper.h:55
Slice.
Definition: ffi_helper.h:49
Ellipsis.
Definition: ffi_helper.h:37
Definition: ffi_helper.h:92
A custom smart pointer for Object.
Definition: object.h:346
void EmplaceInit(size_t idx, Args &&... args)
Definition: ffi_helper.h:133
Definition: ffi_helper.h:84
Slice(int64_t start, int64_t stop, int64_t step, ObjectPtr< SliceObj > &&data=make_object< SliceObj >())
Definition: ffi_helper.h:62
static constexpr const char * _type_key
Definition: ffi_helper.h:88
#define MXNET_DECLARE_FINAL_OBJECT_INFO(TypeName, ParentType)
helper macro to declare type information in a final class.
Definition: object.h:668
ObjectRef CreateEllipsis()
Definition: ffi_helper.h:44
int64_t SliceNoneValue()
Definition: ffi_helper.h:80
Integer(int64_t value, ObjectPtr< IntegerObj > &&data=make_object< IntegerObj >())
Definition: ffi_helper.h:94
reference to algebraic data type objects.
Definition: container.h:209
static constexpr const uint32_t _type_index
Definition: ffi_helper.h:87
static constexpr const char * _type_key
Definition: ffi_helper.h:56
Float(double value, ObjectPtr< FloatObj > &&data=make_object< FloatObj >())
Definition: ffi_helper.h:111
@ kSlice
Definition: object.h:60
@ kEllipsis
Definition: object.h:59
ADTBuilder(uint32_t tag, uint32_t size)
Definition: ffi_helper.h:127
static constexpr const char * _type_key
Definition: ffi_helper.h:40
@ kFloat
Definition: object.h:62
@ kInteger
Definition: object.h:61
Definition: ffi_helper.h:60
friend class ADT
Definition: ffi_helper.h:142
ADTBuilder()=default
default constructor
int64_t start
Definition: ffi_helper.h:51
Runtime memory management.
ObjectPtr< Object > data_
Internal pointer that backs the reference.
Definition: object.h:575
double value
Definition: ffi_helper.h:103
An object representing a structure or enumeration.
Definition: container.h:165
Slice(int64_t stop)
Definition: ffi_helper.h:72
int64_t value
Definition: ffi_helper.h:86
Base class of all object reference.
Definition: object.h:500
int64_t step
Definition: ffi_helper.h:53
static constexpr const uint32_t _type_index
Definition: ffi_helper.h:104
ADT Get()
Definition: ffi_helper.h:137
static constexpr int64_t kNoneValue
Definition: ffi_helper.h:75
#define MXNET_DEFINE_OBJECT_REF_METHODS(TypeName, ParentType, ObjectName)
Definition: object.h:689
Definition: ffi_helper.h:101
ObjectPtr< ArrayType > make_inplace_array_object(size_t num_elems, Args &&... args)
Definition: memory.h:204
A builder class that helps to incrementally build ADT.
Definition: ffi_helper.h:122
static constexpr const char * _type_key
Definition: ffi_helper.h:105
A managed object in MXNet runtime.