Template Function tvm::ffi::make_inplace_array_object

Template Function tvm::ffi::make_inplace_array_object#

Function Documentation#

template<typename ArrayType, typename ElemType, typename ...Args>
inline ObjectPtr<ArrayType> tvm::ffi::make_inplace_array_object(size_t num_elems, Args&&... args)#

Allocate an Object with additional ElemType[num_elems] that are stored right after.

Parameters:
  • num_elems – The number of elements in the array.

  • args – arguments to the constructor.

Template Parameters:
  • ArrayType – the array type.

  • ElemType – the element type.

Returns:

The ObjectPtr to the allocated array.