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, int64_t stop, int64_t step,
67 data_ = std::move(data);
70 explicit inline Slice(int64_t stop)
71 :
Slice(kNoneValue, stop, kNoneValue) {
75 static constexpr int64_t kNoneValue = std::numeric_limits<int64_t>::min();
88 static constexpr
const char*
_type_key =
"MXNet.Integer";
97 data_ = std::move(data);
116 template <
typename... Args>
118 data_->EmplaceInit(idx, std::forward<Args>(args)...);
122 return ADT(std::move(data_));
131 #endif // MXNET_RUNTIME_FFI_HELPER_H_ int64_t start
Definition: ffi_helper.h:51
static constexpr const uint32_t _type_index
Definition: ffi_helper.h:39
#define MXNET_DEFINE_OBJECT_REF_METHODS(TypeName, ParentType, ObjectName)
Definition: object.h:686
void EmplaceInit(size_t idx, Args &&...args)
Definition: ffi_helper.h:117
Slice.
Definition: ffi_helper.h:49
Runtime memory management.
namespace of mxnet
Definition: api_registry.h:33
static constexpr int64_t kNoneValue
Definition: ffi_helper.h:75
A custom smart pointer for Object.
Definition: object.h:345
Slice(int64_t start, int64_t stop, int64_t step, ObjectPtr< SliceObj > &&data=make_object< SliceObj >())
Definition: ffi_helper.h:62
Definition: ffi_helper.h:84
An object representing a structure or enumeration.
Definition: container.h:166
Base class of all object reference.
Definition: object.h:499
MXNET_DECLARE_FINAL_OBJECT_INFO(EllipsisObj, Object)
ADTBuilder(uint32_t tag, uint32_t size)
Definition: ffi_helper.h:111
int64_t stop
Definition: ffi_helper.h:52
base class of all object containers.
Definition: object.h:149
int64_t step
Definition: ffi_helper.h:53
Slice(int64_t stop)
Definition: ffi_helper.h:70
Ellipsis.
Definition: ffi_helper.h:37
A managed object in MXNet runtime.
static constexpr const char * _type_key
Definition: ffi_helper.h:40
ADT Get()
Definition: ffi_helper.h:121
A builder class that helps to incrementally build ADT.
Definition: ffi_helper.h:106
Integer(int64_t value, ObjectPtr< IntegerObj > &&data=make_object< IntegerObj >())
Definition: ffi_helper.h:94
Definition: ffi_helper.h:92
int64_t value
Definition: ffi_helper.h:86
ObjectPtr< ArrayType > make_inplace_array_object(size_t num_elems, Args &&...args)
Definition: memory.h:208
reference to algebraic data type objects.
Definition: container.h:208
ObjectRef CreateEllipsis()
Definition: ffi_helper.h:44
int64_t SliceNoneValue()
Definition: ffi_helper.h:80
Definition: ffi_helper.h:60