MCPcopy Create free account
hub / github.com/apache/tvm-ffi / insert

Method insert

include/tvm/ffi/container/array.h:446–452  ·  view source on GitHub ↗

! * \brief Insert an element into the given position * \param position An iterator pointing to the insertion point * \param val The element to insert */

Source from the content-addressed store, hash-verified

444 * \param val The element to insert
445 */
446 void insert(iterator position, const T& val) {
447 if (data_ == nullptr) {
448 TVM_FFI_THROW(RuntimeError) << "cannot insert a null array";
449 }
450 int64_t idx = std::distance(begin(), position);
451 CopyOnWrite(1)->insert(idx, Any(val));
452 }
453
454 /*!
455 * \brief Insert a range of elements into the given position

Callers 1

AgregateImplMethod · 0.45

Calls 1

AnyClass · 0.50

Tested by

no test coverage detected