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

Function TVMFFIStringFromByteArray

src/ffi/object.cc:603–610  ·  view source on GitHub ↗

string APIs, we blend into object.cc to keep things simple

Source from the content-addressed store, hash-verified

601
602// string APIs, we blend into object.cc to keep things simple
603int TVMFFIStringFromByteArray(const TVMFFIByteArray* input, TVMFFIAny* out) {
604 TVM_FFI_SAFE_CALL_BEGIN();
605 // must set to none first
606 out->type_index = kTVMFFINone;
607 tvm::ffi::TypeTraits<tvm::ffi::String>::MoveToAny(tvm::ffi::String(input->data, input->size),
608 out);
609 TVM_FFI_SAFE_CALL_END();
610}
611
612int TVMFFIBytesFromByteArray(const TVMFFIByteArray* input, TVMFFIAny* out) {
613 TVM_FFI_SAFE_CALL_BEGIN();

Callers

nothing calls this directly

Calls 1

StringClass · 0.50

Tested by

no test coverage detected