! * \brief Constructs a container with n elements. Each element is a copy of val * \param n The size of the container * \param val The init value * \return Ref-counted ArrayObj requested */
| 95 | * \return Ref-counted ArrayObj requested |
| 96 | */ |
| 97 | static ObjectPtr<ArrayObj> CreateRepeated(int64_t n, const Any& val) { |
| 98 | ObjectPtr<ArrayObj> p = ArrayObj::Empty(n); |
| 99 | Any* itr = p->MutableBegin(); |
| 100 | for (int64_t& i = p->TVMFFISeqCell::size = 0; i < n; ++i) { |
| 101 | new (itr++) Any(val); |
| 102 | } |
| 103 | return p; |
| 104 | } |
| 105 | |
| 106 | /// \cond Doxygen_Suppress |
| 107 | static constexpr const int32_t _type_index = TypeIndex::kTVMFFIArray; |
nothing calls this directly
no test coverage detected