aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/erasure/public.h
diff options
context:
space:
mode:
authorqrort <qrort@yandex-team.com>2022-12-02 11:31:25 +0300
committerqrort <qrort@yandex-team.com>2022-12-02 11:31:25 +0300
commitb1f4ffc9c8abff3ba58dc1ec9a9f92d2f0de6806 (patch)
tree2a23209faf0fea5586a6d4b9cee60d1b318d29fe /library/cpp/erasure/public.h
parent559174a9144de40d6bb3997ea4073c82289b4974 (diff)
downloadydb-b1f4ffc9c8abff3ba58dc1ec9a9f92d2f0de6806.tar.gz
remove kikimr/driver DEPENDS
Diffstat (limited to 'library/cpp/erasure/public.h')
-rw-r--r--library/cpp/erasure/public.h57
1 files changed, 0 insertions, 57 deletions
diff --git a/library/cpp/erasure/public.h b/library/cpp/erasure/public.h
deleted file mode 100644
index d5cf01297b..0000000000
--- a/library/cpp/erasure/public.h
+++ /dev/null
@@ -1,57 +0,0 @@
-#pragma once
-
-#include <util/generic/buffer.h>
-#include <util/generic/yexception.h>
-#include <util/memory/blob.h>
-#include <util/string/cast.h>
-#include <util/system/src_root.h>
-
-#include <vector>
-
-#include <bitset>
-
-namespace NErasure {
-
-//! The maximum total number of blocks our erasure codec can handle.
-static constexpr int MaxTotalPartCount = 16;
-
-//! Max word size to use. `w` in jerasure notation
-static constexpr int MaxWordSize = 8;
-
-//! Max threshold to generate bitmask for CanRepair indices for LRC encoding.
-static constexpr int BitmaskOptimizationThreshold = 22;
-
-//! A vector type for holding block indexes.
-using TPartIndexList = std::vector<int>;
-
-//! Each bit corresponds to a possible block index.
-using TPartIndexSet = std::bitset<MaxTotalPartCount>;
-
-template <class TBlobType>
-struct ICodec;
-
-struct TDefaultCodecTraits {
- using TBlobType = TBlob;
- using TMutableBlobType = TBlob;
- using TBufferType = TBuffer;
-
- static inline TMutableBlobType AllocateBlob(size_t size) {
- TBufferType buffer(size);
- buffer.Resize(size);
- // The buffer is cleared after this call so no use after free.
- return TBlob::FromBuffer(buffer);
- }
-
- // AllocateBuffer must fill the memory with 0.
- static inline TBufferType AllocateBuffer(size_t size) {
- TBufferType buffer(size);
- buffer.Fill(0, size);
- return buffer;
- }
-
- static inline TBlobType FromBufferToBlob(TBufferType&& blob) {
- return TBlobType::FromBuffer(blob);
- }
-};
-
-} // namespace NErasure