summaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/memory/ref.cpp
diff options
context:
space:
mode:
authorbabenko <[email protected]>2025-08-01 11:35:13 +0300
committerbabenko <[email protected]>2025-08-01 11:50:44 +0300
commita4d63b4447db7ef4b7968768986871bd8b803429 (patch)
treede85a867bb8a938a6223a99759f66437e2e072af /library/cpp/yt/memory/ref.cpp
parent99ac9785a99d000f2cfb74588d59bfd8249a78bd (diff)
Introduce TSharedRefArray::AreBitwiseEqual
commit_hash:d20246c9bd65274bc0b78b3c1cbc0cfcd5303d10
Diffstat (limited to 'library/cpp/yt/memory/ref.cpp')
-rw-r--r--library/cpp/yt/memory/ref.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/library/cpp/yt/memory/ref.cpp b/library/cpp/yt/memory/ref.cpp
index 7863d7b41d3..cafa276d013 100644
--- a/library/cpp/yt/memory/ref.cpp
+++ b/library/cpp/yt/memory/ref.cpp
@@ -429,6 +429,21 @@ TSharedRefArray TSharedRefArray::MakeCopy(
return builder.Finish();
}
+bool TSharedRefArray::AreBitwiseEqual(
+ const TSharedRefArray& lhs,
+ const TSharedRefArray& rhs)
+{
+ if (lhs.Size() != rhs.Size()) {
+ return false;
+ }
+ for (size_t index = 0; index < lhs.Size(); ++index) {
+ if (TRef::AreBitwiseEqual(lhs[index], rhs[index])) {
+ return false;
+ }
+ }
+ return true;
+}
+
////////////////////////////////////////////////////////////////////////////////
TSharedRefArrayBuilder::TSharedRefArrayBuilder(