summaryrefslogtreecommitdiffstats
path: root/eval
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-09-04 13:40:43 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-09-04 13:40:43 +0000
commit56025c33579feab8bc93cfc10043f2f91257e8c4 (patch)
tree95999ac6935b479821befd0265ed74d4718dd4c7 /eval
parentc93847cff3329fac7ca0eb28be32477c01f90d93 (diff)
Keep oneliners for free functions.
Diffstat (limited to 'eval')
-rw-r--r--eval/src/vespa/eval/onnx/onnx_wrapper.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/eval/src/vespa/eval/onnx/onnx_wrapper.cpp b/eval/src/vespa/eval/onnx/onnx_wrapper.cpp
index 2490457cb1d..89d88dcc32c 100644
--- a/eval/src/vespa/eval/onnx/onnx_wrapper.cpp
+++ b/eval/src/vespa/eval/onnx/onnx_wrapper.cpp
@@ -180,8 +180,7 @@ public:
};
Ort::AllocatorWithDefaultOptions OnnxString::_alloc;
-std::vector<Onnx::DimSize>
-make_dimensions(const Ort::ConstTensorTypeAndShapeInfo &tensor_info) {
+std::vector<Onnx::DimSize> make_dimensions(const Ort::ConstTensorTypeAndShapeInfo &tensor_info) {
std::vector<const char *> symbolic_sizes(tensor_info.GetDimensionsCount(), nullptr);
tensor_info.GetSymbolicDimensions(symbolic_sizes.data(), symbolic_sizes.size());
auto shape = tensor_info.GetShape();
@@ -198,15 +197,13 @@ make_dimensions(const Ort::ConstTensorTypeAndShapeInfo &tensor_info) {
return result;
}
-Onnx::TensorInfo
-make_tensor_info(const OnnxString &name, const Ort::TypeInfo &type_info) {
+Onnx::TensorInfo make_tensor_info(const OnnxString &name, const Ort::TypeInfo &type_info) {
auto tensor_info = type_info.GetTensorTypeAndShapeInfo();
auto element_type = tensor_info.GetElementType();
return Onnx::TensorInfo{vespalib::string(name.get()), make_dimensions(tensor_info), make_element_type(element_type)};
}
-Onnx::TensorType
-get_type_of(const Ort::Value &value) {
+Onnx::TensorType get_type_of(const Ort::Value &value) {
auto tensor_info = value.GetTensorTypeAndShapeInfo();
auto element_type = tensor_info.GetElementType();
auto shape = tensor_info.GetShape();
@@ -218,8 +215,7 @@ get_type_of(const Ort::Value &value) {
return {make_element_type(element_type), shape};
}
-std::vector<int64_t>
-extract_sizes(const ValueType &type) {
+std::vector<int64_t> extract_sizes(const ValueType &type) {
std::vector<int64_t> sizes;
for (const auto &dim: type.dimensions()) {
sizes.push_back(dim.size);