[LPT] clang merge warning fix (#15502)

This commit is contained in:
Edward Shogulin authored and GitHub committed 2023-02-03 21:21:23 +00:00
1 parent 2cae7479a0
commit c1782d9e3d
10 files changed
+10 -10

No files matched your search

@@ -63,7 +63,7 @@ public:
std::vector<ov::Any> toMerge = parentRestrictions;
// TODO: LPT: handle pointer on itself in IntervalsAlignmentAttribute::merge and remove erase, task #59498
toMerge.erase(toMerge.begin());
const_cast<AttributeType&>(resultAttribute).merge(toMerge);
const_cast<AttributeType&>(resultAttribute).merge_attributes(toMerge);
for (size_t index = 1ul; index < parentRestrictions.size(); index++) {
auto& attributes = parentRestrictions[index].template as<AttributeType>().attribute->sharedValue->getAttributes();
@@ -96,7 +96,7 @@ public:
res_attr = parentAttribute;
} else {
std::vector<ov::Any> toMerge = {parentAttribute};
res_attr.template as<AttributeType>().merge(toMerge);
res_attr.template as<AttributeType>().merge_attributes(toMerge);
auto& attributes =
parentAttribute.template as<AttributeType>().attribute->sharedValue->getAttributes();
@@ -26,7 +26,7 @@ class LP_TRANSFORMATIONS_API AvgPoolPrecisionPreservedAttribute : public Precisi
public:
OPENVINO_RTTI("LowPrecision::AvgPoolPrecisionPreserved", "", ov::RuntimeAttribute, 0);
using PrecisionPreservedAttribute::PrecisionPreservedAttribute;
void merge(std::vector<ov::Any>& attributes);
void merge_attributes(std::vector<ov::Any>& attributes);
bool is_skipped() const;
std::string to_string() const override;
};
@@ -71,7 +71,7 @@ public:
static ov::Any create(
const std::shared_ptr<ngraph::Node>& node,
const AttributeParameters& params = AttributeParameters());
void merge(std::vector<ov::Any>& attributes);
void merge_attributes(std::vector<ov::Any>& attributes);
std::string to_string() const override;
// specify subgraph original levels
@@ -34,7 +34,7 @@ public:
const std::shared_ptr<ngraph::Node>& node,
const AttributeParameters& params);
// merge attribute instances which can be got from different sources: node, input port or output port
void merge(std::vector<ov::Any>& attributes);
void merge_attributes(std::vector<ov::Any>& attributes);
// vizualize shared attributes details in VizualizeTree pass
std::string to_string() const override;
};
@@ -34,7 +34,7 @@ public:
static ov::Any create(
const std::shared_ptr<ngraph::Node>& node,
const AttributeParameters& params = AttributeParameters());
void merge(std::vector<ov::Any>& attributes);
void merge_attributes(std::vector<ov::Any>& attributes);
std::string to_string() const override;
};
@@ -12,7 +12,7 @@ using namespace ngraph;
using namespace ov;
void AvgPoolPrecisionPreservedAttribute::merge(std::vector<ov::Any>& attributes) {
void AvgPoolPrecisionPreservedAttribute::merge_attributes(std::vector<ov::Any>& attributes) {
}
bool AvgPoolPrecisionPreservedAttribute::is_skipped() const {
@@ -131,7 +131,7 @@ ov::Any IntervalsAlignmentAttribute::create(
}
}
void IntervalsAlignmentAttribute::merge(
void IntervalsAlignmentAttribute::merge_attributes(
std::vector<ov::Any>& attributes) {
for (const auto& attributeWrapper : attributes) {
auto attribute = attributeWrapper.as<IntervalsAlignmentAttribute>().attribute;
@@ -28,7 +28,7 @@ ov::Any PrecisionsAttribute::create(
return (rt[PrecisionsAttribute::get_type_info_static()] = PrecisionsAttribute(params.defaultPrecisions));
}
void PrecisionsAttribute::merge(std::vector<ov::Any>& attributes) {
void PrecisionsAttribute::merge_attributes(std::vector<ov::Any>& attributes) {
auto& my = value();
for (auto attribute : attributes) {
const auto& attributeValues = attribute.as<PrecisionsAttribute>().value();
@@ -65,7 +65,7 @@ ov::Any QuantizationAlignmentAttribute::create(
return {};
}
void QuantizationAlignmentAttribute::merge(std::vector<ov::Any>& attributes) {
void QuantizationAlignmentAttribute::merge_attributes(std::vector<ov::Any>& attributes) {
for (const auto& other_attribute : attributes) {
value() = value() || other_attribute.as<QuantizationAlignmentAttribute>().value();
}