MCPcopy Create free account
hub / github.com/bytedance/bolt / AsStringView

Function AsStringView

bolt/torch/tests/utils.cpp:53–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51namespace bytedance::bolt::torch::testing {
52
53std::string_view AsStringView(const ::bytedance::bolt::VectorPtr vec) {
54 auto typeKind = vec->type()->kind();
55 auto* loaded_vec = vec->loadedVector();
56 char* data = BOLT_DYNAMIC_SCALAR_TYPE_DISPATCH_ALL(
57 getFlatBufferRawValues, typeKind, loaded_vec);
58 return {data, loaded_vec->usedSize()};
59}
60
61BoltTensor TorchTest::MakeTensor(::at::IntArrayRef sizes, TorchType type) {
62 size_t total_size =

Callers

nothing calls this directly

Calls 4

kindMethod · 0.45
typeMethod · 0.45
loadedVectorMethod · 0.45
usedSizeMethod · 0.45

Tested by

no test coverage detected