MCPcopy Create free account
hub / github.com/Arm-Examples/ML-examples / get_litert_value

Function get_litert_value

kleidiai-examples/audiogen/app/audiogen.cpp:141–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139
140template <typename T>
141static T get_litert_value(litert::Expected<T>&& value) {
142 AUDIOGEN_CHECK(value);
143 if constexpr (std::is_reference_v<T>) {
144 return *value;
145 } else {
146 return std::move(*value);
147 }
148}
149
150static size_t get_num_elems(const litert::RankedTensorType& type) {
151 return get_litert_value(type.Layout().NumElements());

Callers 5

get_num_elemsFunction · 0.85
scoped_lockFunction · 0.85
create_cpu_optionsFunction · 0.85
encode_audioFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected