diff options
author | danlark <danlark@yandex-team.ru> | 2022-02-10 16:46:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:08 +0300 |
commit | 3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (patch) | |
tree | 26154e1e9990f1bb4525d3e3fb5b6dac2c2c1da2 /library/cpp/on_disk/chunks | |
parent | cb68f224c46a8ee52ac3fdd2a32534b8bb8dc134 (diff) | |
download | ydb-3426a9bc7f169ae9da54cef557ad2a33f6e8eee0.tar.gz |
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/on_disk/chunks')
-rw-r--r-- | library/cpp/on_disk/chunks/chunked_helpers.h | 24 | ||||
-rw-r--r-- | library/cpp/on_disk/chunks/writer.cpp | 2 |
2 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/on_disk/chunks/chunked_helpers.h b/library/cpp/on_disk/chunks/chunked_helpers.h index 5fa96afdca..d8ff9237e4 100644 --- a/library/cpp/on_disk/chunks/chunked_helpers.h +++ b/library/cpp/on_disk/chunks/chunked_helpers.h @@ -66,7 +66,7 @@ public: void Save(IOutputStream& out) const { ui64 uSize = (ui64)Vector.size(); out.Write(&uSize, sizeof(uSize)); - out.Write(Vector.data(), Vector.size() * sizeof(T)); + out.Write(Vector.data(), Vector.size() * sizeof(T)); } const T& At(size_t idx) const { @@ -239,7 +239,7 @@ private: bool IsPlainEnought(ui16 bits) const { TVector<size_t> counts(1LL << bits, 0); - for (size_t i = 0; i < Data.size(); ++i) { + for (size_t i = 0; i < Data.size(); ++i) { size_t& count = counts[KeyHash<TKey>(TKeyValuePair::GetFirst(&Data[i]), bits)]; ++count; if (count > 2) @@ -273,7 +273,7 @@ public: const ui32 nBuckets = ui32(1) << bits; TData2 data2(nBuckets); - for (size_t i = 0; i < Data.size(); ++i) + for (size_t i = 0; i < Data.size(); ++i) data2[KeyHash<TKey>(TKeyValuePair::GetFirst(&Data[i]), bits)].push_back(Data[i]); typedef TVector<TInterval> TIntervals; @@ -292,9 +292,9 @@ public: ythrow yexception() << "key clash"; } #endif - out.Write(intervals.data(), intervals.size() * sizeof(intervals[0])); + out.Write(intervals.data(), intervals.size() * sizeof(intervals[0])); for (ui32 i = 0; i < nBuckets; ++i) - out.Write(data2[i].data(), data2[i].size() * sizeof(data2[i][0])); + out.Write(data2[i].data(), data2[i].size() * sizeof(data2[i][0])); } }; @@ -497,7 +497,7 @@ public: inline const char* GetBlockName(size_t index) const { Y_ASSERT(index < GetBlocksCount()); - return Names[index].data(); + return Names[index].data(); } inline const void* GetBlockByName(const char* name) const { @@ -595,7 +595,7 @@ public: } void PushBack(const T& t) { - Offsets.push_back((ui64) Data.size()); + Offsets.push_back((ui64) Data.size()); TSaveLoadVectorNonPodElement<T>::Save(&DataStream, t); } @@ -604,12 +604,12 @@ public: } void Save(IOutputStream& out) const { - ui64 sizeofOffsets = Offsets.size() + 1; + ui64 sizeofOffsets = Offsets.size() + 1; out.Write(&sizeofOffsets, sizeof(sizeofOffsets)); - out.Write(Offsets.data(), Offsets.size() * sizeof(Offsets[0])); - ui64 lastOffset = (ui64) Data.size(); + out.Write(Offsets.data(), Offsets.size() * sizeof(Offsets[0])); + ui64 lastOffset = (ui64) Data.size(); out.Write(&lastOffset, sizeof(lastOffset)); - out.Write(Data.data(), Data.size()); + out.Write(Data.data(), Data.size()); } }; @@ -657,7 +657,7 @@ struct TGeneralVectorG<TItem, true> { template <> struct TSaveLoadVectorNonPodElement<TString> { static inline void Save(IOutputStream* out, const TString& s) { - out->Write(s.data(), s.size() + 1); + out->Write(s.data(), s.size() + 1); } static inline void Load(TMemoryInput* in, TString& s, size_t elementSize) { diff --git a/library/cpp/on_disk/chunks/writer.cpp b/library/cpp/on_disk/chunks/writer.cpp index 6dc7397f09..c74d90dbc1 100644 --- a/library/cpp/on_disk/chunks/writer.cpp +++ b/library/cpp/on_disk/chunks/writer.cpp @@ -3,7 +3,7 @@ #include "writer.h" static inline void WriteAux(IOutputStream* out, const TVector<ui64>& data) { - ::SavePodArray(out, data.data(), data.size()); + ::SavePodArray(out, data.data(), data.size()); } /*************************** TBuffersWriter ***************************/ |