[CPU] fix gen_pattern::AttrAny::equal_to (#23689)
### Details: Backport https://github.com/openvinotoolkit/openvino/pull/21890 from master ### Tickets: - CVS-133621 Co-authored-by: Tingqian Li <tingqian.li@intel.com>
This commit is contained in:
parent
e6fbca158a
commit
15b0f99132
|
|
@ -411,16 +411,16 @@ struct AttrAny {
|
|||
|
||||
template <typename T>
|
||||
bool equal_to(const std::vector<T>& rhs) {
|
||||
if (any.empty() && rhs.empty())
|
||||
return true;
|
||||
if (any.empty())
|
||||
return rhs.empty();
|
||||
auto& vec = any.as<std::vector<T>>();
|
||||
return std::equal(vec.begin(), vec.end(), rhs.begin());
|
||||
}
|
||||
|
||||
template <typename T, typename CT0, typename... CTs>
|
||||
bool equal_to(const std::vector<T>& rhs) {
|
||||
if (any.empty() && rhs.empty())
|
||||
return true;
|
||||
if (any.empty())
|
||||
return rhs.empty();
|
||||
|
||||
if (any.is<std::vector<CT0>>()) {
|
||||
auto& vec = any.as<std::vector<CT0>>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue