Function tvm::ffi::DeepCopy

Function tvm::ffi::DeepCopy#

Function Documentation#

Any tvm::ffi::DeepCopy(const Any &value)#

Deep copy an ffi::Any value.

Recursively copies the value and all reachable objects in its object graph. Copy-constructible types with ObjectDef registration automatically support deep copy. Primitive types, strings, and bytes are returned as-is (they are immutable). Arrays, Lists, and Maps are recursively deep copied. Objects without copy support cause a runtime error.

Parameters:

value – The value to deep copy.

Returns:

The deep copied value.