Skip to content

Commit

Permalink
Fix string_view concatenation.
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Zientkiewicz <[email protected]>
  • Loading branch information
mzient committed Sep 16, 2024
1 parent fccc433 commit 5c32c0c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions dali/operators/math/expressions/expression_tree.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// Copyright (c) 2019-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -140,15 +140,18 @@ class ExprFunc : public ExprNode {

std::string GetNodeDesc() const override {
const auto &op_type = TypeTable::GetTypeInfo(GetTypeId()).name();
std::string result = func_name_ + (IsScalarLike(GetShape()) ? ":C:" : ":T:") + op_type + "(";
std::stringstream result;
result << func_name_ << (IsScalarLike(GetShape()) ? ":C:" : ":T:") << op_type << "(";

for (int i = 0; i < GetSubexpressionCount(); i++) {
result += (*this)[i].GetOutputDesc();
result << (*this)[i].GetOutputDesc();
if (i < GetSubexpressionCount() - 1) {
result += " ";
result << " ";
}
}
result += ")";
return result;

result << ")";
return result.str();
}

NodeType GetNodeType() const override {
Expand Down

0 comments on commit 5c32c0c

Please sign in to comment.