|
1 | | -use fastpfor::{AnyLenCodec, cpp, rust}; |
| 1 | +use fastpfor::cpp::*; |
| 2 | +use fastpfor::{AnyLenCodec, rust}; |
2 | 3 |
|
3 | 4 | pub type BoxedCppCodec = Box<dyn AnyLenCodec>; |
4 | 5 |
|
@@ -78,42 +79,40 @@ pub enum CppCodec { |
78 | 79 | impl From<CppCodec> for BoxedCppCodec { |
79 | 80 | fn from(codec: CppCodec) -> Self { |
80 | 81 | match codec { |
81 | | - CppCodec::BP32 => Box::new(cpp::BP32Codec::default()), |
82 | | - CppCodec::Copy => Box::new(cpp::CopyCodec::default()), |
83 | | - CppCodec::FastBinaryPacking8 => Box::new(cpp::FastBinaryPacking8Codec::default()), |
84 | | - CppCodec::FastPFor128 => Box::new(cpp::FastPFor128Codec::default()), |
85 | | - CppCodec::FastPFor256 => Box::new(cpp::FastPFor256Codec::default()), |
86 | | - CppCodec::FastBinaryPacking16 => Box::new(cpp::FastBinaryPacking16Codec::default()), |
87 | | - CppCodec::FastBinaryPacking32 => Box::new(cpp::FastBinaryPacking32Codec::default()), |
88 | | - CppCodec::MaskedVByte => Box::new(cpp::MaskedVByteCodec::default()), |
89 | | - CppCodec::NewPFor => Box::new(cpp::NewPForCodec::default()), |
90 | | - CppCodec::OptPFor => Box::new(cpp::OptPForCodec::default()), |
91 | | - CppCodec::PFor2008 => Box::new(cpp::PFor2008Codec::default()), |
92 | | - CppCodec::PFor => Box::new(cpp::PForCodec::default()), |
93 | | - CppCodec::SimdBinaryPacking => Box::new(cpp::SimdBinaryPackingCodec::default()), |
94 | | - CppCodec::SimdFastPFor128 => Box::new(cpp::SimdFastPFor128Codec::default()), |
95 | | - CppCodec::SimdFastPFor256 => Box::new(cpp::SimdFastPFor256Codec::default()), |
96 | | - CppCodec::SimdGroupSimple => Box::new(cpp::SimdGroupSimpleCodec::default()), |
97 | | - CppCodec::SimdGroupSimpleRingBuf => { |
98 | | - Box::new(cpp::SimdGroupSimpleRingBufCodec::default()) |
99 | | - } |
100 | | - CppCodec::SimdNewPFor => Box::new(cpp::SimdNewPForCodec::default()), |
101 | | - CppCodec::SimdOptPFor => Box::new(cpp::SimdOptPForCodec::default()), |
102 | | - CppCodec::SimdPFor => Box::new(cpp::SimdPForCodec::default()), |
103 | | - CppCodec::SimdSimplePFor => Box::new(cpp::SimdSimplePForCodec::default()), |
104 | | - // CppCodec::Simple16 => Box::new(cpp::Simple16Codec::default()), |
105 | | - // CppCodec::Simple8b => Box::new(cpp::Simple8bCodec::default()), |
106 | | - // CppCodec::Simple8bRle => Box::new(cpp::Simple8bRleCodec::default()), |
107 | | - // CppCodec::Simple9 => Box::new(cpp::Simple9Codec::default()), |
108 | | - // CppCodec::Simple9Rle => Box::new(cpp::Simple9RleCodec::default()), |
109 | | - // CppCodec::SimplePFor => Box::new(cpp::SimplePForCodec::default()), |
110 | | - // CppCodec::Snappy => Box::new(cpp::SnappyCodec::default()), |
111 | | - CppCodec::StreamVByte => Box::new(cpp::StreamVByteCodec::default()), |
112 | | - CppCodec::VByte => Box::new(cpp::VByteCodec::default()), |
113 | | - CppCodec::VarInt => Box::new(cpp::VarIntCodec::default()), |
114 | | - // CppCodec::VarIntG8iu => Box::new(cpp::VarIntG8iuCodec::default()), |
115 | | - CppCodec::VarIntGb => Box::new(cpp::VarIntGbCodec::default()), |
116 | | - // CppCodec::VsEncoding => Box::new(cpp::VsEncodingCodec::default()), |
| 82 | + CppCodec::BP32 => Box::new(CppBP32::default()), |
| 83 | + CppCodec::Copy => Box::new(CppCopy::default()), |
| 84 | + CppCodec::FastBinaryPacking8 => Box::new(CppFastBinaryPacking8::default()), |
| 85 | + CppCodec::FastPFor128 => Box::new(CppFastPFor128::default()), |
| 86 | + CppCodec::FastPFor256 => Box::new(CppFastPFor256::default()), |
| 87 | + CppCodec::FastBinaryPacking16 => Box::new(CppFastBinaryPacking16::default()), |
| 88 | + CppCodec::FastBinaryPacking32 => Box::new(CppFastBinaryPacking32::default()), |
| 89 | + CppCodec::MaskedVByte => Box::new(CppMaskedVByte::default()), |
| 90 | + CppCodec::NewPFor => Box::new(CppNewPFor::default()), |
| 91 | + CppCodec::OptPFor => Box::new(CppOptPFor::default()), |
| 92 | + CppCodec::PFor2008 => Box::new(CppPFor2008::default()), |
| 93 | + CppCodec::PFor => Box::new(CppPFor::default()), |
| 94 | + CppCodec::SimdBinaryPacking => Box::new(CppSimdBinaryPacking::default()), |
| 95 | + CppCodec::SimdFastPFor128 => Box::new(CppSimdFastPFor128::default()), |
| 96 | + CppCodec::SimdFastPFor256 => Box::new(CppSimdFastPFor256::default()), |
| 97 | + CppCodec::SimdGroupSimple => Box::new(CppSimdGroupSimple::default()), |
| 98 | + CppCodec::SimdGroupSimpleRingBuf => Box::new(CppSimdGroupSimpleRingBuf::default()), |
| 99 | + CppCodec::SimdNewPFor => Box::new(CppSimdNewPFor::default()), |
| 100 | + CppCodec::SimdOptPFor => Box::new(CppSimdOptPFor::default()), |
| 101 | + CppCodec::SimdPFor => Box::new(CppSimdPFor::default()), |
| 102 | + CppCodec::SimdSimplePFor => Box::new(CppSimdSimplePFor::default()), |
| 103 | + // CppCodec::Simple16 => Box::new(CppSimple16::default()), |
| 104 | + // CppCodec::Simple8b => Box::new(CppSimple8b::default()), |
| 105 | + // CppCodec::Simple8bRle => Box::new(CppSimple8bRle::default()), |
| 106 | + // CppCodec::Simple9 => Box::new(CppSimple9::default()), |
| 107 | + // CppCodec::Simple9Rle => Box::new(CppSimple9Rle::default()), |
| 108 | + // CppCodec::SimplePFor => Box::new(CppSimplePFor::default()), |
| 109 | + // CppCodec::Snappy => Box::new(CppSnappy::default()), |
| 110 | + CppCodec::StreamVByte => Box::new(CppStreamVByte::default()), |
| 111 | + CppCodec::VByte => Box::new(CppVByte::default()), |
| 112 | + CppCodec::VarInt => Box::new(CppVarInt::default()), |
| 113 | + // CppCodec::VarIntG8iu => Box::new(CppVarIntG8iu::default()), |
| 114 | + CppCodec::VarIntGb => Box::new(CppVarIntGb::default()), |
| 115 | + // CppCodec::VsEncoding => Box::new(CppVsEncoding::default()), |
117 | 116 | } |
118 | 117 | } |
119 | 118 | } |
|
0 commit comments